{"_id":"@nodeutils/defaults-deep","_rev":"4019370","name":"@nodeutils/defaults-deep","description":"Like lodash's _.defaultsDeep, but with array preservation","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"drewdotpro","email":""}],"time":{"modified":"2025-09-01T02:35:55.000Z","created":"2016-08-15T19:57:38.064Z","1.1.0":"2016-09-06T08:02:18.139Z","1.0.3":"2016-09-05T11:56:45.229Z","1.0.2":"2016-08-16T07:21:37.120Z","1.0.1":"2016-08-15T20:13:16.997Z","1.0.0":"2016-08-15T19:57:38.064Z"},"users":{},"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"versions":{"1.1.0":{"name":"@nodeutils/defaults-deep","version":"1.1.0","description":"Like lodash's _.defaultsDeep, but with array preservation","main":"lib/index.js","scripts":{"test":"babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js","build":"babel src -d lib","coverage":"ws -p 8888 -d coverage/lcov-report/"},"files":["lib"],"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"keywords":["nodeutils","defaultsDeep","lodash","array","merge"],"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"license":"ISC","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"homepage":"https://github.com/nodeutils/defaults-deep#readme","devDependencies":{"babel-cli":"^6.11.4","babel-preset-es2015":"^6.13.2","chai":"^3.5.0","istanbul":"^0.4.4","local-web-server":"^1.2.6","mocha":"^3.0.2"},"dependencies":{"lodash":"^4.15.0"},"gitHead":"f56a172de763a388f35271fb3e85744397debea9","_id":"@nodeutils/defaults-deep@1.1.0","_shasum":"bb1124dc8d7ce0bc5da1d668ace58149258ef20b","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"drewdotpro","email":"drew@drew.pro"},"dist":{"shasum":"bb1124dc8d7ce0bc5da1d668ace58149258ef20b","size":1305,"noattachment":false,"key":"/@nodeutils/defaults-deep/-/@nodeutils/defaults-deep-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@nodeutils/defaults-deep/download/@nodeutils/defaults-deep-1.1.0.tgz"},"maintainers":[{"name":"drewdotpro","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/defaults-deep-1.1.0.tgz_1473148937489_0.3926189898047596"},"directories":{},"publish_time":1473148938139,"_hasShrinkwrap":false,"_cnpm_publish_time":1473148938139,"_cnpmcore_publish_time":"2021-12-16T18:49:04.859Z"},"1.0.3":{"name":"@nodeutils/defaults-deep","version":"1.0.3","description":"Like lodash's _.defaultsDeep, but with array preservation","main":"lib/index.js","scripts":{"test":"babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js","build":"babel src -d lib","coverage":"ws -p 8888 -d coverage/lcov-report/"},"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"keywords":["nodeutils","defaultsDeep","lodash","array","merge"],"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"license":"ISC","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"homepage":"https://github.com/nodeutils/defaults-deep#readme","devDependencies":{"babel-cli":"^6.11.4","babel-preset-es2015":"^6.13.2","chai":"^3.5.0","istanbul":"^0.4.4","local-web-server":"^1.2.6","mocha":"^3.0.2"},"dependencies":{"lodash":"^4.15.0"},"gitHead":"5597cd6292e1d2099389908373dc6f00b229e4b4","_id":"@nodeutils/defaults-deep@1.0.3","_shasum":"0971005b846e4ff4f4dbcef8da04f61fb2af8ff6","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"drewdotpro","email":"drew@drew.pro"},"dist":{"shasum":"0971005b846e4ff4f4dbcef8da04f61fb2af8ff6","size":1345,"noattachment":false,"key":"/@nodeutils/defaults-deep/-/@nodeutils/defaults-deep-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@nodeutils/defaults-deep/download/@nodeutils/defaults-deep-1.0.3.tgz"},"maintainers":[{"name":"drewdotpro","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/defaults-deep-1.0.3.tgz_1473076603960_0.0006671862211078405"},"directories":{},"publish_time":1473076605229,"_hasShrinkwrap":false,"_cnpm_publish_time":1473076605229,"_cnpmcore_publish_time":"2021-12-16T18:49:05.087Z"},"1.0.2":{"name":"@nodeutils/defaults-deep","version":"1.0.2","description":"Like lodash's _.defaultsDeep, but with array preservation","main":"lib/index.js","scripts":{"test":"babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js","build":"babel src -d lib","coverage":"ws -p 8888 -d coverage/lcov-report/"},"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"keywords":["nodeutils","defaultsDeep","lodash","array","merge"],"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"license":"ISC","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"homepage":"https://github.com/nodeutils/defaults-deep#readme","devDependencies":{"babel-cli":"^6.11.4","babel-preset-es2015":"^6.13.2","chai":"^3.5.0","istanbul":"^0.4.4","local-web-server":"^1.2.6","mocha":"^3.0.2"},"dependencies":{"lodash":"^4.15.0"},"gitHead":"6a7654e5e568dc29709761c6652d7a3c3e5a9712","_id":"@nodeutils/defaults-deep@1.0.2","_shasum":"687abfc77af8a8ddc193b8e98958bfba0f5ef527","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"drewdotpro","email":"drew@drew.pro"},"dist":{"shasum":"687abfc77af8a8ddc193b8e98958bfba0f5ef527","size":2965,"noattachment":false,"key":"/@nodeutils/defaults-deep/-/@nodeutils/defaults-deep-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@nodeutils/defaults-deep/download/@nodeutils/defaults-deep-1.0.2.tgz"},"maintainers":[{"name":"drewdotpro","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/defaults-deep-1.0.2.tgz_1471332095366_0.18725815857760608"},"directories":{},"publish_time":1471332097120,"_hasShrinkwrap":false,"_cnpm_publish_time":1471332097120,"_cnpmcore_publish_time":"2021-12-16T18:49:05.303Z"},"1.0.1":{"name":"@nodeutils/defaults-deep","version":"1.0.1","description":"Like lodash's _.defaultsDeep, but with array preservation","main":"lib/index.js","scripts":{"test":"babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js","build":"babel src -d lib","coverage":"ws -p 8888 -d coverage/lcov-report/"},"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"keywords":["nodeutils","defaultsDeep","lodash","array","merge"],"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"license":"ISC","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"homepage":"https://github.com/nodeutils/defaults-deep#readme","devDependencies":{"babel-cli":"^6.11.4","babel-preset-es2015":"^6.13.2","chai":"^3.5.0","istanbul":"^0.4.4","local-web-server":"^1.2.6","mocha":"^3.0.2"},"dependencies":{"lodash":"^4.15.0"},"gitHead":"71ed958f8e24514e6317695ae73bcc96bc58cf09","_id":"@nodeutils/defaults-deep@1.0.1","_shasum":"d942ccd0aed99997c11602b03c54c721c1341829","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"drewdotpro","email":"drew@drew.pro"},"dist":{"shasum":"d942ccd0aed99997c11602b03c54c721c1341829","size":2938,"noattachment":false,"key":"/@nodeutils/defaults-deep/-/@nodeutils/defaults-deep-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@nodeutils/defaults-deep/download/@nodeutils/defaults-deep-1.0.1.tgz"},"maintainers":[{"name":"drewdotpro","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/defaults-deep-1.0.1.tgz_1471291995240_0.7282285830006003"},"directories":{},"publish_time":1471291996997,"_hasShrinkwrap":false,"_cnpm_publish_time":1471291996997,"_cnpmcore_publish_time":"2021-12-16T18:49:05.582Z"},"1.0.0":{"name":"@nodeutils/defaults-deep","version":"1.0.0","description":"Like lodash's _.defaultsDeep, but with array preservation","main":"lib/index.js","scripts":{"test":"babel src -d lib && node ./node_modules/istanbul/lib/cli.js cover ./test/test.js -x ./test/test.js","build":"babel src -d lib","coverage":"ws -p 8888 -d coverage/lcov-report/"},"repository":{"type":"git","url":"git+https://github.com/nodeutils/defaults-deep.git"},"keywords":["nodeutils","defaultsDeep","lodash","array","merge"],"author":{"name":"Drew Llewellyn","email":"drew@drew.pro","url":"http://drew.pro"},"license":"ISC","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"homepage":"https://github.com/nodeutils/defaults-deep#readme","devDependencies":{"babel-cli":"^6.11.4","babel-preset-es2015":"^6.13.2","chai":"^3.5.0","istanbul":"^0.4.4","local-web-server":"^1.2.6","mocha":"^3.0.2"},"dependencies":{"lodash":"^4.15.0"},"gitHead":"5891c2df8cd4b8a5887b53bd8b7a1b70f81d067e","_id":"@nodeutils/defaults-deep@1.0.0","_shasum":"857a44a06abed408f1e5c3cbef3512b24e3f55ac","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"drewdotpro","email":"drew@drew.pro"},"dist":{"shasum":"857a44a06abed408f1e5c3cbef3512b24e3f55ac","size":2910,"noattachment":false,"key":"/@nodeutils/defaults-deep/-/@nodeutils/defaults-deep-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@nodeutils/defaults-deep/download/@nodeutils/defaults-deep-1.0.0.tgz"},"maintainers":[{"name":"drewdotpro","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/defaults-deep-1.0.0.tgz_1471291056049_0.14793663937598467"},"directories":{},"publish_time":1471291058064,"_hasShrinkwrap":false,"_cnpm_publish_time":1471291058064,"_cnpmcore_publish_time":"2021-12-16T18:49:05.793Z"}},"readme":"# defaults-deep\n## An individual component of the [[nodeutils package]](https://www.npmjs.com/package/nodeutils)\n\nSimilar to lodash's defaultsDeep, but without mutating the source object, and no merging of arrays.\n\n\n## Installation\n\nInstall the package via `npm`:\n\n```\n$ npm install @nodeutils/defaults-deep --save\n```\n\n## Usage\n\n#### Arguments\n2. `[sources]` *(...Object)*: The source objects. Provide 2 or more, in descending order of importance\n\n#### Returns\n*(Object)*: Returns the merged objects\n\n#### Example\n```js\nvar defaultsDeep = require('@nodeutils/defaults-deep');\n\nvar objectA = { bar: { biz: { net: 'txi', qox: 'fuc' } }, qux: ['baz'] };\nvar objectB = { bar: { biz: { net: 'qux'} }, qux: ['biz', 'ban'] };\nvar objectC = { bar: { biz: { net: 'qux', lee: 'sox' } }, qux: ['biz', 'rep'], foo: 'bar' };\n\ndefaultsDeep(objectA, objectB, objectC);\n// => { bar: { biz: { net: 'qux', qox: 'fuc', lee: 'sox' } }, qux: ['baz'], foo: 'bar' }\n```\n\n###How\nIncredibly simple:\n```js\n\"use strict\";\nconst _ = require(\"lodash\");\nmodule.exports = function () {\n    let output = {};\n    _.toArray(arguments).reverse().forEach(item=> {\n        _.mergeWith(output, item, (objectValue, sourceValue) => {\n            return _.isArray(sourceValue) ? sourceValue : undefined;\n        });\n    });\n    return output;\n};\n```","_attachments":{},"homepage":"https://github.com/nodeutils/defaults-deep#readme","bugs":{"url":"https://github.com/nodeutils/defaults-deep/issues"},"license":"ISC"}