This commit is contained in:
msnie
2024-02-03 11:58:42 +01:00
parent 17ca1c805f
commit 5b0b5f548c
706 changed files with 135245 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
/**
* Merge object b with object a.
*
* var a = { foo: 'bar' }
* , b = { bar: 'baz' };
*
* merge(a, b);
* // => { foo: 'bar', bar: 'baz' }
*
* @param {Object} a
* @param {Object} b
* @return {Object}
* @api public
*/
exports = module.exports = function(a, b){
if (a && b) {
for (var key in b) {
a[key] = b[key];
}
}
return a;
};