{ "_args": [ [ { "raw": "deepmerge@^1.3.0", "scope": null, "escapedName": "deepmerge", "name": "deepmerge", "rawSpec": "^1.3.0", "spec": ">=1.3.0 <2.0.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/probe-image-size" ] ], "_from": "deepmerge@>=1.3.0 <2.0.0", "_id": "deepmerge@1.5.2", "_inCache": true, "_location": "/deepmerge", "_nodeVersion": "8.2.1", "_npmOperationalInternal": { "host": "s3://npm-registry-packages", "tmp": "tmp/deepmerge-1.5.2.tgz_1506004387614_0.020388633012771606" }, "_npmUser": { "name": "tehshrike", "email": "me@JoshDuff.com" }, "_npmVersion": "5.4.2", "_phantomChildren": {}, "_requested": { "raw": "deepmerge@^1.3.0", "scope": null, "escapedName": "deepmerge", "name": "deepmerge", "rawSpec": "^1.3.0", "spec": ">=1.3.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/probe-image-size", "/rest-facade" ], "_resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz", "_shasum": "10499d868844cdad4fee0842df8c7f6f0c95a753", "_shrinkwrap": null, "_spec": "deepmerge@^1.3.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/probe-image-size", "author": { "name": "Nick Fisher" }, "browser": "dist/cjs.js", "bugs": { "url": "https://github.com/KyleAMathews/deepmerge/issues" }, "dependencies": {}, "description": "A library for deep (recursive) merging of Javascript objects", "devDependencies": { "is-mergeable-object": "1.1.0", "jsmd": "0.3.1", "rollup": "0.49.3", "rollup-plugin-commonjs": "8.2.1", "rollup-plugin-node-resolve": "3.0.0", "tap": "~7.1.2" }, "directories": {}, "dist": { "integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==", "shasum": "10499d868844cdad4fee0842df8c7f6f0c95a753", "tarball": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz" }, "engines": { "node": ">=0.10.0" }, "gitHead": "94a59c4a11e21462a6d281bf8b1b13d2d5512c4f", "homepage": "https://github.com/KyleAMathews/deepmerge", "keywords": [ "merge", "deep", "extend", "copy", "clone", "recursive" ], "license": "MIT", "main": "dist/umd.js", "maintainers": [ { "name": "tehshrike", "email": "me@JoshDuff.com" }, { "name": "kylemathews", "email": "mathews.kyle@gmail.com" } ], "module": "dist/es.js", "name": "deepmerge", "optionalDependencies": {}, "readme": "deepmerge\n=========\n\n> ~540B gzipped, ~1.1kB minified\n\nMerge the enumerable attributes of two objects deeply.\n\nthe future\n----------\n\nShould we publish a version 2? [Give your opinion.](https://github.com/KyleAMathews/deepmerge/issues/72)\n\nexample\n=======\n\n\n\n```js\nvar x = {\n foo: { bar: 3 },\n array: [{\n does: 'work',\n too: [ 1, 2, 3 ]\n }]\n}\n\nvar y = {\n foo: { baz: 4 },\n quux: 5,\n array: [{\n does: 'work',\n too: [ 4, 5, 6 ]\n }, {\n really: 'yes'\n }]\n}\n\nvar expected = {\n foo: {\n bar: 3,\n baz: 4\n },\n array: [{\n does: 'work',\n too: [ 1, 2, 3, 4, 5, 6 ]\n }, {\n really: 'yes'\n }],\n quux: 5\n}\n\nmerge(x, y) // => expected\n```\n\nmethods\n=======\n\n```\nvar merge = require('deepmerge')\n```\n\nmerge(x, y, [options])\n-----------\n\nMerge two objects `x` and `y` deeply, returning a new merged object with the\nelements from both `x` and `y`.\n\nIf an element at the same key is present for both `x` and `y`, the value from\n`y` will appear in the result.\n\nMerging creates a new object, so that neither `x` or `y` are be modified. However, child objects on `x` or `y` are copied over - if you want to copy all values, you must pass `true` to the clone option.\n\nmerge.all(arrayOfObjects, [options])\n-----------\n\nMerges two or more objects into a single result object.\n\n```js\nvar x = { foo: { bar: 3 } }\nvar y = { foo: { baz: 4 } }\nvar z = { bar: 'yay!' }\n\nvar expected = { foo: { bar: 3, baz: 4 }, bar: 'yay!' }\n\nmerge.all([x, y, z]) // => expected\n```\n\n### options\n\n#### arrayMerge\n\nThe merge will also merge arrays and array values by default. However, there are nigh-infinite valid ways to merge arrays, and you may want to supply your own. You can do this by passing an `arrayMerge` function as an option.\n\n```js\nfunction concatMerge(destinationArray, sourceArray, options) {\n\tdestinationArray // => [1, 2, 3]\n\tsourceArray // => [3, 2, 1]\n\toptions // => { arrayMerge: concatMerge }\n\treturn destinationArray.concat(sourceArray)\n}\nmerge([1, 2, 3], [3, 2, 1], { arrayMerge: concatMerge }) // => [1, 2, 3, 3, 2, 1]\n```\n\nTo prevent arrays from being merged:\n\n```js\nconst dontMerge = (destination, source) => source\nconst output = merge({ coolThing: [1,2,3] }, { coolThing: ['a', 'b', 'c'] }, { arrayMerge: dontMerge })\noutput // => { coolThing: ['a', 'b', 'c'] }\n```\n\n#### clone\n\nDefaults to `false`. If `clone` is `true` then both `x` and `y` are recursively cloned as part of the merge.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n```sh\nnpm install deepmerge\n```\n\nJust want to download the file without using any package managers/bundlers? [Download the UMD version from unpkg.com](https://unpkg.com/deepmerge/dist/umd.js).\n\ntest\n====\n\nWith [npm](http://npmjs.org) do:\n\n```sh\nnpm test\n```\n\nlicense\n=======\n\nMIT\n", "readmeFilename": "README.markdown", "repository": { "type": "git", "url": "git://github.com/KyleAMathews/deepmerge.git" }, "scripts": { "build": "rollup -c", "test": "npm run build && tap test/*.js && jsmd README.markdown" }, "version": "1.5.2" }