{"name":"@75lb/deep-merge","version":"1.1.3","keywords":["merge","deep merge","array","object","merge","options"],"author":{"url":"http://75lb.com","name":"Lloyd Brookes","email":"opensource@75lb.com"},"license":"MIT","_id":"@75lb/deep-merge@1.1.3","maintainers":[{"name":"75lb","email":"opensource@75lb.com"}],"homepage":"https://github.com/75lb/deep-merge#readme","bugs":{"url":"https://github.com/75lb/deep-merge/issues"},"dist":{"shasum":"a9ec082860cff3572d0a26534aa98766ad5e61db","tarball":"http://registry-npm.ywwl.com/@75lb/deep-merge/download/@75lb/deep-merge-1.1.3.tgz","fileCount":5,"integrity":"sha512-XhE6kVFVmX0oyynUI7k70s2fj1cUch/ipSM5SzI+NRFu3IwDZ2T/sNjY1DPO8lAaY3W0tZ2MITeAvPLhm7sdVQ==","signatures":[{"sig":"MEYCIQD3Ts4il4o2S8y0psAY9CNc5tFvnrVGJFumYXtH/pkP8AIhANBa2eqtNOyvLGCjexJOhTaYDopaydHy9AlxMixy5q0m","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53409,"size":12797,"noattachment":false,"key":"/@75lb/deep-merge/-/@75lb/deep-merge-1.1.3.tgz"},"type":"module","engines":{"node":">=12.17"},"exports":"./index.js","gitHead":"1f9b4e6100186e6469b33ea502ec5ae5e4017292","scripts":{"dist":"75lb-nature simple-rollup index.js","test":"npm run dist && npm run test:ci","test:ci":"75lb-nature test-runner test.js"},"_npmUser":{"name":"75lb","email":"opensource@75lb.com"},"standard":{"envs":[],"ignore":["tmp","dist"]},"repository":{"url":"git+https://github.com/75lb/deep-merge.git","type":"git"},"_npmVersion":"11.6.2","description":"Deep-merge the values of one object structure into another","directories":{},"_nodeVersion":"25.0.0","dependencies":{"lodash":"^4.17.21","typical":"^7.1.1"},"_hasShrinkwrap":false,"devDependencies":{},"peerDependencies":{"@75lb/nature":"latest"},"peerDependenciesMeta":{"@75lb/nature":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/deep-merge_1.1.3_1772880713208_0.7871781218127538","host":"s3://npm-registry-packages-npm-production"},"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":1772880713357,"_cnpm_publish_time":1772880713357,"dist-tags":{"latest":"1.1.5"}}