aswi2020vldc-gitlab/templetes/node_modules/utils-merge/index.js @ 9bb1e829
1 |
/**
|
---|---|
2 |
* Merge object b with object a.
|
3 |
*
|
4 |
* var a = { foo: 'bar' }
|
5 |
* , b = { bar: 'baz' };
|
6 |
*
|
7 |
* merge(a, b);
|
8 |
* // => { foo: 'bar', bar: 'baz' }
|
9 |
*
|
10 |
* @param {Object} a
|
11 |
* @param {Object} b
|
12 |
* @return {Object}
|
13 |
* @api public
|
14 |
*/
|
15 |
|
16 |
exports = module.exports = function(a, b){ |
17 |
if (a && b) { |
18 |
for (var key in b) { |
19 |
a[key] = b[key]; |
20 |
}
|
21 |
}
|
22 |
return a; |
23 |
};
|