Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
381 bytes
|
Line | |
---|
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 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.