From 2127e196322d8c21124dcd15d28fe43b9f8b8ddb Mon Sep 17 00:00:00 2001 From: krakenrf <> Date: Thu, 27 Oct 2022 12:26:32 +0100 Subject: node --- middleware/node_modules/utils-merge/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 middleware/node_modules/utils-merge/index.js (limited to 'middleware/node_modules/utils-merge/index.js') diff --git a/middleware/node_modules/utils-merge/index.js b/middleware/node_modules/utils-merge/index.js new file mode 100644 index 0000000..4265c69 --- /dev/null +++ b/middleware/node_modules/utils-merge/index.js @@ -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; +}; -- cgit v1.2.3