{"_id":"@75lb/deep-merge","_rev":"3518624","name":"@75lb/deep-merge","description":"Deep-merge the values of one object structure into another","dist-tags":{"latest":"1.1.2"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"time":{"modified":"2024-08-27T20:52:51.000Z","created":"2021-06-09T11:20:33.854Z","1.1.2":"2024-07-31T20:41:12.737Z","1.1.1":"2021-09-05T15:21:32.775Z","1.1.0":"2021-08-18T11:15:25.984Z","1.0.0":"2021-06-09T11:20:33.854Z"},"users":{},"author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/75lb/deep-merge.git"},"versions":{"1.1.2":{"name":"@75lb/deep-merge","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.1.2","description":"Deep-merge the values of one object structure into another","repository":{"type":"git","url":"git+https://github.com/75lb/deep-merge.git"},"exports":"./index.js","keywords":["merge","deep merge","array","object","merge","options"],"license":"MIT","type":"module","engines":{"node":">=12.17"},"scripts":{"test":"npm run dist && npm run test:ci","test:ci":"test-runner test.js","dist":"rollup -c"},"dependencies":{"lodash":"^4.17.21","typical":"^7.1.1"},"devDependencies":{"@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-node-resolve":"^15.2.3","rollup":"^4.19.1","test-runner":"^0.11.0"},"standard":{"ignore":["tmp","dist"],"envs":[]},"_id":"@75lb/deep-merge@1.1.2","gitHead":"83d415fceba803d588b75cf50ccbdb3b9c73e4ac","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"homepage":"https://github.com/75lb/deep-merge#readme","_nodeVersion":"22.5.1","_npmVersion":"10.8.2","dist":{"shasum":"6aa53d9730e64a159075da65d3bd057abfe1dde0","size":11412,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@75lb/deep-merge/download/@75lb/deep-merge-1.1.2.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deep-merge_1.1.2_1722458472588_0.1371960302141797"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-31T20:41:12.737Z","publish_time":1722458472737,"_source_registry_name":"default","_cnpm_publish_time":1722458472737},"1.1.1":{"name":"@75lb/deep-merge","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.1.1","description":"Deep-merge the values of one object structure into another","repository":{"type":"git","url":"git+https://github.com/75lb/deep-merge.git"},"exports":"./index.js","keywords":["merge","deep merge","array","object","merge","options"],"license":"MIT","type":"module","engines":{"node":">=12.17"},"scripts":{"test":"npm run dist && npm run test:ci","test:ci":"test-runner test.js","dist":"rollup -c","cover":"c8 npm test && c8 report --reporter=text-lcov | coveralls"},"dependencies":{"lodash.assignwith":"^4.2.0","typical":"^7.1.1"},"devDependencies":{"@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","c8":"^7.8.0","coveralls":"^3.1.1","rollup":"^2.56.3","test-runner":"^0.9.8"},"gitHead":"a310783ab3b2cfe4c6f5cfc5cd0d099b1d4d4f50","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"homepage":"https://github.com/75lb/deep-merge#readme","_id":"@75lb/deep-merge@1.1.1","_nodeVersion":"16.8.0","_npmVersion":"7.22.0","dist":{"shasum":"3b06155b90d34f5f8cc2107d796f1853ba02fd6d","size":6450,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@75lb/deep-merge/download/@75lb/deep-merge-1.1.1.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deep-merge_1.1.1_1630855292637_0.16383550275014813"},"_hasShrinkwrap":false,"publish_time":1630855292775,"_cnpm_publish_time":1630855292775},"1.1.0":{"name":"@75lb/deep-merge","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.1.0","description":"Deep-merge the values of one object structure into another","repository":{"type":"git","url":"git+https://github.com/75lb/deep-merge.git"},"exports":"./index.js","keywords":["merge","deep merge","array","object","merge","options"],"license":"MIT","type":"module","engines":{"node":">=12.17"},"scripts":{"test":"npm run dist && npm run test:ci","test:ci":"test-runner test.js","dist":"rollup -c","cover":"c8 npm test && c8 report --reporter=text-lcov | coveralls"},"dependencies":{"lodash.assignwith":"^4.2.0","typical":"^7.1.1"},"devDependencies":{"@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","c8":"^7.8.0","coveralls":"^3.1.1","rollup":"^2.56.2","test-runner":"^0.9.8"},"gitHead":"d8c1ce12bbced88d0316c1bb9e5a2ebc02f54e1a","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"homepage":"https://github.com/75lb/deep-merge#readme","_id":"@75lb/deep-merge@1.1.0","_nodeVersion":"16.6.2","_npmVersion":"7.20.6","dist":{"shasum":"6dc1fc77c8288fe316f56686ead1b4aeea1b5956","size":6325,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@75lb/deep-merge/download/@75lb/deep-merge-1.1.0.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deep-merge_1.1.0_1629285325823_0.354015021037722"},"_hasShrinkwrap":false,"publish_time":1629285325984,"_cnpm_publish_time":1629285325984},"1.0.0":{"name":"@75lb/deep-merge","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.0.0","description":"@75lb/deep-merge","repository":{"type":"git","url":"git+https://github.com/75lb/deep-merge.git"},"main":"./index.mjs","exports":{"import":"./index.mjs"},"keywords":[],"license":"MIT","engines":{"node":">=14"},"scripts":{"test":"npm run dist && test-runner test.mjs","dist":"rollup -c"},"dependencies":{"lodash.assignwith":"^4.2.0","typical":"^7.0.0"},"devDependencies":{"@rollup/plugin-commonjs":"^19.0.0","@rollup/plugin-node-resolve":"^13.0.0","rollup":"^2.51.1","test-runner":"^0.9.2"},"gitHead":"78a6203c3b4e81579737e5e3033f22e89ad160d2","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"homepage":"https://github.com/75lb/deep-merge#readme","_id":"@75lb/deep-merge@1.0.0","_nodeVersion":"16.3.0","_npmVersion":"7.16.0","dist":{"shasum":"2abb9c4686b40cee73994449ec53b19619898f7f","size":5377,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@75lb/deep-merge/download/@75lb/deep-merge-1.0.0.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deep-merge_1.0.0_1623237633717_0.08529137337772252"},"_hasShrinkwrap":false,"publish_time":1623237633854,"_cnpm_publish_time":1623237633854}},"readme":"[![view on npm](https://badgen.net/npm/v/@75lb/deep-merge)](https://www.npmjs.org/package/@75lb/deep-merge)\n[![npm module downloads](https://badgen.net/npm/dt/@75lb/deep-merge)](https://www.npmjs.org/package/@75lb/deep-merge)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/deep-merge)](https://github.com/75lb/deep-merge/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/deep-merge)](https://github.com/75lb/deep-merge/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/deep-merge/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/deep-merge/actions/workflows/node.js.yml)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# @75lb/deep-merge\n\nDeep-merge the values of one object structure into another. Similar to [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) except it processes the full depth of the object structure, not only the top level. Useful for merging config.\n\n## Synopsis\n\n```js\nimport deepMerge from '@75lb/deep-merge'\n\n```\n\n### Simple\n\nTypical example merging four objects. Input:\n\n```js\ndeepMerge(\n  { port: 8000, data: { animal: 'cow' } },\n  { stack: ['one'] },\n  { stack: ['two'], help: true },\n  { data: { animal: 'bat', metal: 'iron' } }\n)\n```\n\nResult\n\n```js\n{\n  port: 8000,\n  stack: ['two'],\n  help: true,\n  data: { animal: 'bat', metal: 'iron' }\n}\n```\n\n### Arrays\n\nEmpty arrays are ignored and not merged in. Input:\n\n```js\ndeepMerge(\n  { stack: ['one'] },\n  { stack: [] }\n)\n```\n\nResult:\n\n\n```js\n{ stack: ['one'] }\n```\n\nHowever, if the later array contains one or more values the later array will *replace* the original: \n\n```js\ndeepMerge(\n  { stack: ['one'] },\n  { stack: ['two'] }\n)\n```\n\nResult:\n\n```js\n{ stack: ['two'] }\n```\n\n### Load anywhere\n\nThis library is compatible with Node.js, the Web and any style of module loader. It can be loaded anywhere, natively without transpilation.\n\nWithin a Node.js ECMAScript Module:\n\n```js\nimport deepMerge from '@75lb/deep-merge'\n```\n\nWithin an modern browser ECMAScript Module:\n\n```js\nimport deepMerge from './node_modules/@75lb/deep-merge/dist/index.mjs'\n```\n\n* * *\n\n&copy; 2018-24 [Lloyd Brookes](https://github.com/75lb) \\<75pound@gmail.com\\>.\n\nTested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","_attachments":{},"homepage":"https://github.com/75lb/deep-merge#readme","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"license":"MIT"}