🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
26
node_modules/property-information/lib/util/merge.js
generated
vendored
Normal file
26
node_modules/property-information/lib/util/merge.js
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @typedef {import('./schema.js').Properties} Properties
|
||||
* @typedef {import('./schema.js').Normal} Normal
|
||||
*/
|
||||
|
||||
import {Schema} from './schema.js'
|
||||
|
||||
/**
|
||||
* @param {Schema[]} definitions
|
||||
* @param {string} [space]
|
||||
* @returns {Schema}
|
||||
*/
|
||||
export function merge(definitions, space) {
|
||||
/** @type {Properties} */
|
||||
const property = {}
|
||||
/** @type {Normal} */
|
||||
const normal = {}
|
||||
let index = -1
|
||||
|
||||
while (++index < definitions.length) {
|
||||
Object.assign(property, definitions[index].property)
|
||||
Object.assign(normal, definitions[index].normal)
|
||||
}
|
||||
|
||||
return new Schema(property, normal, space)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue