{"name":"@75lb/deep-merge","version":"1.1.2","keywords":["merge","deep merge","array","object","merge","options"],"author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"license":"MIT","_id":"@75lb/deep-merge@1.1.2","maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"homepage":"https://github.com/75lb/deep-merge#readme","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"dist":{"shasum":"6aa53d9730e64a159075da65d3bd057abfe1dde0","tarball":"http://registry-npm.ywwl.com/@75lb/deep-merge/download/@75lb/deep-merge-1.1.2.tgz","fileCount":5,"integrity":"sha512-08K9ou5VNbheZFxM5tDWoqjA3ImC50DiuuJ2tj1yEPRfkp8lLLg6XAaJ4On+a0yAXor/8ay5gHnAIshRM44Kpw==","signatures":[{"sig":"MEYCIQDy7KVHweUhJW6l6XPVFx0l6kJ4A9M/nN8TUSTBBAYVVgIhALlE2aR/ZIz/HOZLu+LOrBYoZ5VnIv3ef9ZGb1VVpqFv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43649,"size":11412,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.1.2.tgz"},"type":"module","engines":{"node":">=12.17"},"exports":"./index.js","gitHead":"83d415fceba803d588b75cf50ccbdb3b9c73e4ac","scripts":{"dist":"rollup -c","test":"npm run dist && npm run test:ci","test:ci":"test-runner test.js"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"standard":{"envs":[],"ignore":["tmp","dist"]},"repository":{"url":"git+https://github.com/75lb/deep-merge.git","type":"git"},"_npmVersion":"10.8.2","description":"Deep-merge the values of one object structure into another","directories":{},"_nodeVersion":"22.5.1","dependencies":{"lodash":"^4.17.21","typical":"^7.1.1"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.19.1","test-runner":"^0.11.0","@rollup/plugin-commonjs":"^26.0.1","@rollup/plugin-node-resolve":"^15.2.3"},"_npmOperationalInternal":{"tmp":"tmp/deep-merge_1.1.2_1722458472588_0.1371960302141797","host":"s3://npm-registry-packages"},"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\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-26 [Lloyd Brookes](https://github.com/75lb) \\<opensource@75lb.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","publish_time":1722458472737,"_cnpm_publish_time":1722458472737,"dist-tags":{"latest":"1.1.5"}}