{"_id":"object-assign-deep","_rev":"437204","name":"object-assign-deep","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","dist-tags":{"latest":"0.4.0"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"time":{"modified":"2021-08-05T06:19:50.000Z","created":"2015-01-26T12:08:42.745Z","0.4.0":"2018-04-04T15:16:29.966Z","0.3.1":"2017-05-09T11:08:18.046Z","0.3.0":"2017-05-09T09:52:15.160Z","0.2.0":"2017-05-05T16:04:12.143Z","0.1.0":"2017-05-05T15:09:08.407Z","0.0.4":"2015-01-28T17:22:49.503Z","0.0.3":"2015-01-28T17:13:54.887Z","0.0.2":"2015-01-28T17:01:04.013Z","0.0.1":"2015-01-26T12:08:42.745Z"},"users":{"kodekracker":true,"vidhill":true,"geofftech":true},"author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"versions":{"0.4.0":{"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.4.0","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","keywords":["object","assign","deep","extend","clone","copy","merge","object","array"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{},"devDependencies":{"eslint":"latest","eslint-config-recombix":"latest","eslint-config-vue":"latest","eslint-plugin-disable":"latest","eslint-plugin-filenames":"latest","eslint-plugin-html":"latest","eslint-plugin-json":"latest","eslint-plugin-node":"latest","eslint-plugin-promise":"latest","eslint-plugin-vue":"latest"},"license":"MIT","engines":{"node":">=6"},"gitHead":"2f9608d0083638a7e6899e591792f5ede0cff6cf","homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","_id":"object-assign-deep@0.4.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"dist":{"shasum":"43505d3679abb9686ab359b97ac14cc837a9d143","size":4282,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.4.0.tgz"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/object-assign-deep_0.4.0_1522854989890_0.41170633060348316"},"_hasShrinkwrap":false,"publish_time":1522854989966,"_cnpm_publish_time":1522854989966},"0.3.1":{"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.3.1","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","keywords":["object","assign","deep","extend","clone","copy","merge","object","array"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{},"devDependencies":{"eslint":"latest","eslint-config-recombix":"latest","eslint-plugin-filenames":"latest","eslint-plugin-json":"latest","eslint-plugin-node":"^4.2.1","eslint-plugin-promise":"latest"},"license":"MIT","engines":{"node":">=6"},"gitHead":"f0f76357914d31c546b5641aa99eee3ab4f40a68","homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","_id":"object-assign-deep@0.3.1","scripts":{},"_shasum":"b57b7572d9a328d6448a3f4b6c0fffc8b10c61a2","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"dist":{"shasum":"b57b7572d9a328d6448a3f4b6c0fffc8b10c61a2","size":14332,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.3.1.tgz"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/object-assign-deep-0.3.1.tgz_1494328096625_0.6111126265022904"},"directories":{},"publish_time":1494328098046,"_hasShrinkwrap":false,"_cnpm_publish_time":1494328098046},"0.3.0":{"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.3.0","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","keywords":["object","assign","deep","extend","clone","copy","merge","object","array"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{},"devDependencies":{"eslint":"latest","eslint-config-recombix":"latest","eslint-plugin-filenames":"latest","eslint-plugin-json":"latest","eslint-plugin-node":"^4.2.1","eslint-plugin-promise":"latest"},"license":"MIT","engines":{"node":">=6"},"gitHead":"de6ae91f165405e8e8d0a83d70a3aebac664d0ec","homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","_id":"object-assign-deep@0.3.0","scripts":{},"_shasum":"854f6b3c1a54681cddd2eb5592562edcf0ef07df","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"dist":{"shasum":"854f6b3c1a54681cddd2eb5592562edcf0ef07df","size":14306,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.3.0.tgz"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/object-assign-deep-0.3.0.tgz_1494323533860_0.6485381231177598"},"directories":{},"publish_time":1494323535160,"_hasShrinkwrap":false,"_cnpm_publish_time":1494323535160},"0.2.0":{"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.2.0","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","keywords":["object","assign","deep","extend","clone","copy","merge","object","array"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{},"devDependencies":{"eslint":"latest","eslint-config-recombix":"latest","eslint-plugin-filenames":"latest","eslint-plugin-json":"latest","eslint-plugin-node":"^4.2.1","eslint-plugin-promise":"latest"},"license":"MIT","engines":{"node":">=6"},"gitHead":"f90be03ffcffba821d91dd0c84eecc121cdc4378","homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","_id":"object-assign-deep@0.2.0","scripts":{},"_shasum":"92eddc8e71fac45a5fdccdab221dcbe26c882c6d","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"dist":{"shasum":"92eddc8e71fac45a5fdccdab221dcbe26c882c6d","size":13758,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.2.0.tgz"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/object-assign-deep-0.2.0.tgz_1494000250301_0.6554410809185356"},"directories":{},"publish_time":1494000252143,"_cnpm_publish_time":1494000252143,"_hasShrinkwrap":false},"0.1.0":{"repository":{"type":"git","url":"git+https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.1.0","description":"Allows deep cloning of plain objects that contain primitives, nested plain objects, or nested plain arrays.","keywords":["object","assign","deep","extend","clone","copy","object","array"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{},"devDependencies":{"eslint":"latest","eslint-config-recombix":"latest","eslint-plugin-filenames":"latest","eslint-plugin-json":"latest","eslint-plugin-node":"^4.2.1","eslint-plugin-promise":"latest"},"license":"MIT","engines":{"node":">=6"},"gitHead":"e9a970e0e7f1884a47f45ef23eb6633137b6be2e","homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","_id":"object-assign-deep@0.1.0","scripts":{},"_shasum":"4b013c4ecaedf86caa7fc339af2a7a190aea2aff","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"dist":{"shasum":"4b013c4ecaedf86caa7fc339af2a7a190aea2aff","size":13400,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.1.0.tgz"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/object-assign-deep-0.1.0.tgz_1493996946567_0.036716576432809234"},"directories":{},"publish_time":1493996948407,"_hasShrinkwrap":false,"_cnpm_publish_time":1493996948407},"0.0.4":{"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.0.4","description":"Like \"object-assign\", but deeper.","keywords":["object","assign","deep","extend"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{"object-assign":"2.0.x","underscore":"1.7.x"},"license":"MIT","gitHead":"e1958a5f424607ba8b16c299fe36c3e014b7f468","homepage":"https://github.com/saikojosh/Object-Assign-Deep","_id":"object-assign-deep@0.0.4","scripts":{},"_shasum":"2b336c86caab38ebac55eff39ff4df60947efbf3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"dist":{"shasum":"2b336c86caab38ebac55eff39ff4df60947efbf3","size":1483,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.0.4.tgz"},"directories":{},"publish_time":1422465769503,"_cnpm_publish_time":1422465769503,"_hasShrinkwrap":false},"0.0.3":{"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.0.3","description":"Like \"object-assign\", but deeper.","keywords":["object","assign","deep","extend"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{"object-assign":"2.0.x","underscore":"1.7.x"},"license":"MIT","gitHead":"b5e39665e40bb926557156b9c5220122aeb7b927","homepage":"https://github.com/saikojosh/Object-Assign-Deep","_id":"object-assign-deep@0.0.3","scripts":{},"_shasum":"7f0a361b354c12e6c26fade5d5f084a6bb567b7e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"dist":{"shasum":"7f0a361b354c12e6c26fade5d5f084a6bb567b7e","size":1459,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.0.3.tgz"},"directories":{},"publish_time":1422465234887,"_cnpm_publish_time":1422465234887,"_hasShrinkwrap":false},"0.0.2":{"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.0.2","description":"Like \"object-assign\", but deeper.","keywords":["object","assign","deep","extend"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{"object-assign":"2.0.x","underscore":"1.7.x"},"license":"MIT","gitHead":"debe422fd721e1eaee6799c814404cb633df0e36","homepage":"https://github.com/saikojosh/Object-Assign-Deep","_id":"object-assign-deep@0.0.2","scripts":{},"_shasum":"9c7e05e5801f68662628c5787f99b778fe044139","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"dist":{"shasum":"9c7e05e5801f68662628c5787f99b778fe044139","size":1336,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.0.2.tgz"},"directories":{},"publish_time":1422464464013,"_cnpm_publish_time":1422464464013,"_hasShrinkwrap":false},"0.0.1":{"publishConfig":{"registry":"https://registry.npmjs.org"},"repository":{"type":"git","url":"https://github.com/saikojosh/Object-Assign-Deep.git"},"bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"name":"object-assign-deep","version":"0.0.1","description":"Like \"object-assign\", but deeper.","keywords":["object","assign","deep","extend"],"main":"objectAssignDeep.js","author":{"name":"Josh Cole","email":"saikojosh@gmail.com","url":"http://www.JoshuaCole.me"},"contributors":[{"name":"Josh Cole","email":"saikojosh@gmail.com"}],"dependencies":{"object-assign":"2.0.x","underscore":"1.7.x"},"license":"MIT","gitHead":"d07de8c3369d90feff1fefff9b10d1cbe264fe1b","homepage":"https://github.com/saikojosh/Object-Assign-Deep","_id":"object-assign-deep@0.0.1","scripts":{},"_shasum":"935cce6141bf6124829e7fe534f4dc58ee07cb87","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"saikojosh","email":"saikojosh@gmail.com"},"maintainers":[{"name":"saikojosh","email":"saikojosh@gmail.com"}],"dist":{"shasum":"935cce6141bf6124829e7fe534f4dc58ee07cb87","size":1308,"noattachment":false,"key":"/object-assign-deep/-/object-assign-deep-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/object-assign-deep/download/object-assign-deep-0.0.1.tgz"},"directories":{},"publish_time":1422274122745,"_cnpm_publish_time":1422274122745,"_hasShrinkwrap":false}},"readme":"# Object-Assign-Deep\nLike [Object.assign()](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) but deeper. This module is the holy grail of simple object manipulation in JavaScript and it does not resort to using the JSON functions. If you need more power or fine-grained control please take a look at the [Object-Extender](https://npmjs.org/package/object-extender) module.\n\n## Breaking Changes in v0.3!\n* `objectAssignDeep()` now mutates the first argument in the same way `Object.assign()` does.\n* By default, arrays are now replaced instead of merged to preserve backwards compatibility with older versions of this module.\n\n## Caution! Danger of Death!\nThis module is to be used with PLAIN objects that contain primitive values ONLY. Every time you misuse this module a kitten dies.. yes you're a kitten killer.\n\nDo not use this module if:\n* Your objects are (or contain) native objects such as Date (nested Array is fine).\n* Your objects contain circular references (you'll cause a stack overflow).\n* Your objects are instances of some class you've written.\n* You are concerned with prototype chains, property descriptors, unenumerable properties, and any other advanced uses.\n\nIf you need to do something fancy like the above you'll need to write a custom solution for your use case.\n\n## Quick Start\nYou can merge plain objects or clone them:\n\n```javascript\nconst objectAssignDeep = require(`object-assign-deep`);\n\nconst mergedObjects = objectAssignDeep(target, object1, object2, ...objectN);\n\nconst clonedObject = objectAssignDeep({}, originalObject);\n```\n\nSimples!\n\n## Full Example\nSee the `./examples` directory for a few examples, including one example case that demonstrates why you can't get clever with object cloning.\n\n```javascript\nconst objectAssignDeep = require(`object-assign-deep`);\n\nconst objectA = {\n\tprop1: `Hello`,\n\tprop2: `World`,\n\tnested: {\n\t\tbool: true,\n\t\tsuper: 123,\n\t\tstill: `here!`,\n\t},\n\tarray1: [1, 2, 3],\n\tarray2: [4, 5, 6],\n};\n\nconst objectB = {\n\tprop2: `Universe`,\n\tname: `Josh`,\n\tnested: {\n\t\tbool: false,\n\t},\n\tarray1: null,\n};\n\nconst objectC = {\n\tlocation: `United Kingdom`,\n\tname: `Bob`,\n\tnested: {\n\t\tsuper: 999,\n\t},\n\tarray2: [100, 101, 102],\n};\n\nconst result = objectAssignDeep(objectA, objectB, objectC);\n\nconsole.log(`Result:`, result);\n\n/*\n*   {\n*     prop1: 'Hello',\n*     prop2: 'Universe',\n*     nested: { bool: false, super: 999, still: 'here!' },\n*     array1: null,\n*     array2: [100, 101, 102],\n*     name: 'Bob',\n*     location: 'United Kingdom'\n*   }\n*/\n```\n\n## API Overview\n\n### objectAssignDeep(target, object1, object2, ...objectN);\nMerges all the objects together mutating the `target` in the process and returning the result.\n\n### objectAssignDeep.noMutate(object1, object2, ...objectN);\nMerges all the objects together without mutating any of them and returning the entirely new object.\n\n### objectAssignDeep.withOptions(target, objects, options);\nTakes a target, an array of objects to merge in, and an options object which can be used to change the behaviour of the function. The available options are:\n\n| Option         | Default Value | Description |\n|----------------|---------------|-------------|\n| arrayBehaviour | \"replace\"     | By default arrays in later objects will overwrite earlier values, but you can set this to \"merge\" if you want to concatenate the arrays instead. |\n\nIf you need more customisation options please take a look at the [Object-Extender](https://npmjs.org/package/object-extender) module which builds upon Object-Assign-Deep.\n","_attachments":{},"homepage":"https://github.com/saikojosh/Object-Assign-Deep#readme","bugs":{"url":"https://github.com/saikojosh/Object-Assign-Deep/issues"},"license":"MIT"}