{"_id":"deep-defaults","_rev":"137321","name":"deep-defaults","description":"Recursive version of _.defaults","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"time":{"modified":"2021-06-03T11:22:29.000Z","created":"2014-12-21T21:55:04.533Z","1.0.5":"2018-09-15T18:01:42.517Z","1.0.4":"2016-01-22T23:38:06.075Z","1.0.3":"2015-01-30T23:11:29.296Z","1.0.2":"2015-01-30T22:13:07.219Z","1.0.1":"2014-12-21T22:07:00.145Z","1.0.0":"2014-12-21T21:55:04.533Z"},"users":{},"author":{"name":"Daniel Kang","email":"me@daniel.gs"},"repository":{"type":"git","url":"git+https://github.com/d5/deep-defaults.git"},"versions":{"1.0.5":{"name":"deep-defaults","description":"Recursive version of _.defaults","version":"1.0.5","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/d5/deep-defaults.git"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"^4.17.5"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"license":"MIT","gitHead":"321d0e2231aa807d54e7f95d75c22048a806923f","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.5","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"d5","email":"me@daniel.gs"},"dist":{"shasum":"3bbc6b5773fb07e4cebe3fb69a18c5a9435f140f","size":2750,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.5.tgz"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deep-defaults_1.0.5_1537034502386_0.7194780221510371"},"_hasShrinkwrap":false,"publish_time":1537034502517,"_cnpm_publish_time":1537034502517,"deprecated":"not actively maintained; find alternatives"},"1.0.4":{"name":"deep-defaults","description":"Recursive version of _.defaults","version":"1.0.4","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/d5/deep-defaults.git"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"3.0.x"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"license":"MIT","gitHead":"8a95fa65e04d1554c4eb1a3e186f67a6f5a12fe1","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.4","_shasum":"1a9762e2b6c8d6a4e9931b8ee7ff8cdcee1d1750","_from":".","_npmVersion":"3.5.1","_nodeVersion":"4.2.2","_npmUser":{"name":"d5","email":"me@daniel.gs"},"dist":{"shasum":"1a9762e2b6c8d6a4e9931b8ee7ff8cdcee1d1750","size":2804,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.4.tgz"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"directories":{},"publish_time":1453505886075,"_cnpm_publish_time":1453505886075,"_hasShrinkwrap":false,"deprecated":"not actively maintained; find alternatives"},"1.0.3":{"name":"deep-defaults","description":"Recursive version of _.defaults","version":"1.0.3","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/d5/deep-defaults"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"3.0.x"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"gitHead":"d9c1901ec8579e8752c3a229cc947f0cd3d0b24d","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.3","_shasum":"a4039f505f90807d126e075f514a73342ad23801","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"d5","email":"me@daniel.gs"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"dist":{"shasum":"a4039f505f90807d126e075f514a73342ad23801","size":2930,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.3.tgz"},"directories":{},"publish_time":1422659489296,"_cnpm_publish_time":1422659489296,"_hasShrinkwrap":false,"deprecated":"not actively maintained; find alternatives"},"1.0.2":{"name":"deep-defaults","description":"Recursive version of _.defaults","version":"1.0.2","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/d5/deep-defaults"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"2.4.1"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"gitHead":"d9c1901ec8579e8752c3a229cc947f0cd3d0b24d","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.2","_shasum":"d0620f6bad80ed7eee2590c785c24c4edcc9c977","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.11.16","_npmUser":{"name":"d5","email":"me@daniel.gs"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"dist":{"shasum":"d0620f6bad80ed7eee2590c785c24c4edcc9c977","size":2922,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.2.tgz"},"directories":{},"publish_time":1422655987219,"_cnpm_publish_time":1422655987219,"_hasShrinkwrap":false,"deprecated":"not actively maintained; find alternatives"},"1.0.1":{"name":"deep-defaults","description":"Recursive version of _.defaults","version":"1.0.1","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/d5/deep-defaults"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"2.4.1"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"gitHead":"526a3205c9e37afc9a62bac98996aff3872473bc","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.1","_shasum":"37d9c3f419dacf01a17a5ad785e52f4c097c27ac","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"d5","email":"me@daniel.gs"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"dist":{"shasum":"37d9c3f419dacf01a17a5ad785e52f4c097c27ac","size":2150,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.1.tgz"},"directories":{},"publish_time":1419199620145,"_cnpm_publish_time":1419199620145,"_hasShrinkwrap":false,"deprecated":"not actively maintained; find alternatives"},"1.0.0":{"name":"deep-defaults","description":"Recursive version of _.defaults()","version":"1.0.0","main":"lib/index.js","repository":{"type":"git","url":"https://github.com/d5/deep-defaults"},"homepage":"https://github.com/d5/deep-defaults","author":{"name":"Daniel Kang","email":"me@daniel.gs"},"dependencies":{"lodash":"2.4.1"},"devDependencies":{"jshint":"2.5.x","mocha":"1.20.x"},"scripts":{"test":"jshint lib && node_modules/.bin/jshint test && node_modules/.bin/mocha test"},"gitHead":"5436e3578742a181a032963ff014c26d9a1bb6ee","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"_id":"deep-defaults@1.0.0","_shasum":"77ca0d59e76999e4ade36e0fc54258742d2486a7","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"d5","email":"me@daniel.gs"},"maintainers":[{"name":"d5","email":"me@daniel.gs"}],"dist":{"shasum":"77ca0d59e76999e4ade36e0fc54258742d2486a7","size":1573,"noattachment":false,"key":"/deep-defaults/-/deep-defaults-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/deep-defaults/download/deep-defaults-1.0.0.tgz"},"directories":{},"publish_time":1419198904533,"_cnpm_publish_time":1419198904533,"_hasShrinkwrap":false,"deprecated":"not actively maintained; find alternatives"}},"readme":"# deep-defaults\n\n[![NPM](https://nodei.co/npm/deep-defaults.png?compact=true)](https://nodei.co/npm/deep-defaults/)\n\nRecursive version of _.defaults.\n\n```javascript\nvar deepDefaults = require('deep-defaults');\n\nconsole.log(JSON.stringify(deepDefaults(\n    {\"a\":1}, \n    {\"a\":5,\"b\":10})));\n    // {\"a\":1,\"b\":10} \n\nconsole.log(JSON.stringify(deepDefaults(\n    {\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, \n    {\"a\":{\"k\":7},\"d\":{\"i\":8}}))); \n    // {\"a\":{\"b\":1,\"c\":2,\"k\":7},\"d\":{\"e\":3,\"f\":4,\"i\":8},\"g\":5} \n```\n\n\n## Examples\n- deepDefaults({}, {}) == {} \n- deepDefaults({}, undefined) == {} \n- deepDefaults({}, null) == {} \n- deepDefaults(undefined, undefined) == undefined \n- deepDefaults(undefined, {}) == undefined \n- deepDefaults(null, {}) == null \n- deepDefaults(undefined, {\"a\":1}) == undefined \n- deepDefaults(null, {\"a\":1}) == null \n- deepDefaults({}, {\"a\":1}) == {\"a\":1} \n- deepDefaults({\"a\":1}, {\"a\":1}) == {\"a\":1} \n- deepDefaults({\"a\":2}, {\"a\":1}) == {\"a\":2} \n- deepDefaults({\"a\":2}, {\"a\":null}) == {\"a\":2} \n- deepDefaults({\"a\":2}, {}) == {\"a\":2} \n- deepDefaults({\"a\":2}, {\"a\":{}}) == {\"a\":2} \n- deepDefaults({\"a\":{}}, {\"a\":1}) == {\"a\":{}} \n- deepDefaults({\"a\":null}, {\"a\":1}) == {\"a\":null} \n- deepDefaults({}, {\"a\":1}) == {\"a\":1} \n- deepDefaults({\"a\":2,\"b\":1}, {\"a\":1}) == {\"a\":2,\"b\":1} \n- deepDefaults({\"a\":2,\"b\":1}, {\"b\":2}) == {\"a\":2,\"b\":1} \n- deepDefaults({\"a\":2,\"b\":1}, {\"a\":1,\"b\":2}) == {\"a\":2,\"b\":1} \n- deepDefaults({\"a\":2,\"b\":1}, {\"a\":1,\"b\":2,\"c\":3}) == {\"a\":2,\"b\":1,\"c\":3} \n- deepDefaults({\"a\":{\"b\":1}}, {}) == {\"a\":{\"b\":1}} \n- deepDefaults({\"a\":{\"b\":1}}, {\"a\":1}) == {\"a\":{\"b\":1}} \n- deepDefaults({\"a\":{\"b\":1}}, {\"b\":2}) == {\"a\":{\"b\":1},\"b\":2} \n- deepDefaults({\"a\":{\"b\":1,\"c\":3}}, {\"b\":2}) == {\"a\":{\"b\":1,\"c\":3},\"b\":2} \n- deepDefaults({\"a\":{\"b\":1,\"c\":3}}, {\"a\":{}}) == {\"a\":{\"b\":1,\"c\":3}} \n- deepDefaults({\"a\":{\"b\":1,\"c\":3}}, {\"a\":{\"b\":2}}) == {\"a\":{\"b\":1,\"c\":3}} \n- deepDefaults({\"a\":{\"b\":1,\"c\":3}}, {\"a\":{\"d\":4}}) == {\"a\":{\"b\":1,\"c\":3,\"d\":4}} \n- deepDefaults({\"a\":{}}, {\"a\":{\"d\":4}}) == {\"a\":{\"d\":4}} \n- deepDefaults({\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, {}) == {\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5} \n- deepDefaults({\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, {\"h\":6}) == {\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5,\"h\":6} \n- deepDefaults({\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, {\"a\":6}) == {\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5} \n- deepDefaults({\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, {\"a\":{\"k\":7}}) == {\"a\":{\"b\":1,\"c\":2,\"k\":7},\"d\":{\"e\":3,\"f\":4},\"g\":5} \n- deepDefaults({\"a\":{\"b\":1,\"c\":2},\"d\":{\"e\":3,\"f\":4},\"g\":5}, {\"a\":{\"k\":7},\"d\":{\"i\":8}}) == {\"a\":{\"b\":1,\"c\":2,\"k\":7},\"d\":{\"e\":3,\"f\":4,\"i\":8},\"g\":5} \n- deepDefaults({\"foo\":\"foo\"}, {\"foo\":\"foo\"}) == {\"foo\":\"foo\"} \n- deepDefaults({\"foo\":\"foo\"}, {}) == {\"foo\":\"foo\"} \n- deepDefaults({}, {\"foo\":\"foo\"}) == {\"foo\":\"foo\"} \n- deepDefaults({\"foo\":7}, {\"foo\":\"foo\"}) == {\"foo\":7} \n- deepDefaults({\"foo\":\"foo\"}, {\"foo\":7}) == {\"foo\":\"foo\"} \n- deepDefaults({\"foo\":{}}, {\"foo\":\"foo\"}) == {\"foo\":{}} \n- deepDefaults({\"foo\":{\"bar\":7}}, {\"foo\":\"foo\"}) == {\"foo\":{\"bar\":7}} \n- deepDefaults({\"foo\":{\"bar\":\"foobar\"}}, {\"foo\":\"barfoo\"}) == {\"foo\":{\"bar\":\"foobar\"}} \n- deepDefaults({\"foo\":\"barfoo\"}, {\"foo\":{\"bar\":\"foobar\"}}) == {\"foo\":\"barfoo\"} \n- deepDefaults({}, {\"foo\":[4,5,6]}) == {\"foo\":[4,5,6]} \n- deepDefaults({\"foo\":[1,2,3]}, {\"foo\":[4,5,6]}) == {\"foo\":[1,2,3]} \n- deepDefaults({\"foo\":[1,2,3]}, {\"foo\":\"bar\"}) == {\"foo\":[1,2,3]} \n- deepDefaults({\"foo\":[1,2,3]}, {\"foo\":[1,2,3,4]}) == {\"foo\":[1,2,3]} \n","_attachments":{},"homepage":"https://github.com/d5/deep-defaults","bugs":{"url":"https://github.com/d5/deep-defaults/issues"},"license":"MIT"}