source: node_modules/property-information/lib/util/merge.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 494 bytes
Line 
1'use strict'
2
3var xtend = require('xtend')
4var Schema = require('./schema')
5
6module.exports = merge
7
8function merge(definitions) {
9 var length = definitions.length
10 var property = []
11 var normal = []
12 var index = -1
13 var info
14 var space
15
16 while (++index < length) {
17 info = definitions[index]
18 property.push(info.property)
19 normal.push(info.normal)
20 space = info.space
21 }
22
23 return new Schema(
24 xtend.apply(null, property),
25 xtend.apply(null, normal),
26 space
27 )
28}
Note: See TracBrowser for help on using the repository browser.