{"_id":"lodash-redux-immutability","_rev":"3-33b442f0fe90bc570d7ff6bf5dde33e4","name":"lodash-redux-immutability","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"lodash-redux-immutability","author":{"name":"https://sarink.net"},"version":"0.0.1","description":"Lean immutable wrappers around lodash get/set/update/delete, especially helpful for redux reducers.","main":"dist/lodash-redux-immutability/lodash-redux-immutability","scripts":{"start:dev":"webpack-dev-server","lint":"tslint --project src/lodash-redux-immutability","lint:watch":"SHELL=/bin/bash chokidar webpack.config.* tslint.json tsconfig.json ./**/*.ts ./**/*.tsx -c \"npm run lint\" --initial --verbose","lint:fix":"tslint --project src/lodash-redux-immutability --fix","build:prod":"tsc --project src/lodash-redux-immutability"},"keywords":["lodash immutable set","lodash immutable update","lodash","immutable","redux","helper","immutable set","immutable update"],"repository":{"type":"git","url":"git+https://github.com/sarink/lodash-redux-immutability.git"},"license":"MIT","bugs":{"url":"https://github.com/sarink/lodash-redux-immutability/issues"},"homepage":"https://github.com/sarink/lodash-redux-immutability#readme","dependencies":{"lodash.clone":"^4.5.0","lodash.get":"^4.4.2","lodash.isempty":"^4.4.0","lodash.isnumber":"^3.0.3","lodash.isstring":"^4.0.1","lodash.setwith":"^4.3.2","lodash.unset":"^4.5.2"},"peerDependencies":{},"devDependencies":{"@types/chai":"^4.1.3","@types/lodash.clone":"^4.5.3","@types/lodash.get":"^4.4.3","@types/lodash.isempty":"^4.4.3","@types/lodash.isnumber":"^3.0.3","@types/lodash.isstring":"^4.0.3","@types/lodash.setwith":"^4.3.3","@types/lodash.unset":"^4.5.3","@types/mocha":"^5.0.0","@types/node":"^9.6.5","@types/webpack":"^4.1.3","@types/webpack-dev-server":"^2.9.4","chai":"^4.1.2","chokidar":"^2.0.3","chokidar-cli":"^1.2.0","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11","html-webpack-plugin":"^3.2.0","mocha":"^5.0.5","source-map-loader":"^0.2.3","style-loader":"^0.21.0","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.8.0","typescript":"^2.8.1","webpack":"^3.8.1","webpack-dev-server":"^2.9.4"},"gitHead":"c1cde546608c3ab0221ee9dc2ec1aa2fe88ca60d","_id":"lodash-redux-immutability@0.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"sarink","email":"sarink87@gmail.com"},"dist":{"integrity":"sha512-DYEuOdIWiEMKzoJ4y59NVzvrZenuFEm/UbLUimBWyL0nTXzNDzH+ZgQYj93ZZy3xi/tZP2Kphn+OzFZe1rIi4g==","shasum":"edc46327a20986bdea0bef96d74a6c3ea3b7d437","tarball":"https://registry.npmjs.org/lodash-redux-immutability/-/lodash-redux-immutability-0.0.1.tgz","fileCount":21,"unpackedSize":29079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3o4SCRA9TVsSAnZWagAA/Q0P/iYjPV6cBmdIDp5O56u0\nHdVW/yDpz0PXM/j6RgDx3VTSxu58UFBI5sMgUvbSIa6sSRKb7GUewsSU3O6h\nA7XnVJxNuzIqDhrqVCfdo4XTR3fYnLUnQSB4HjSqHXyNtFu7ttFLscDrqxfl\nmYEcGwuoo9ezDRVmgk4DHDWLE1AZ0wFqC/4DGHqU6ZxrGNsk36Rg2JbsdxI0\nb1L5iGd3KpU5vVHM9/X/GNWFbFVxEiNCDLaxDO46LtMjv75Jwfjd+/ewdCrs\nHqoEPshAfVZy3zSd3F21AJEnGn4uOz5qnfD2EaNbw95zYwIBtRgriLelKZgo\n1L+vveVcoypSq1/jTnQ/AJrXjbiSVfcDNtDNDqydtOMDBW7uEQkjDul7p2Xk\nqYa6ToGvQAOox5Bizq5sUlkbglHBjcYQIx9pwsyzhB68xHIY202DGxthp8sF\n/iq4k4lZZI294rx7FceXVbkYfT+UKUyfnP+w3jFslLZHgUpGOE0YY5G4IsaH\nae1N3jw3Jd+4jrRKXfUp6d8b+vzTYhKUhs++WtRNZ7lOjRsC1+meFzwoTYho\nUymvewb8jprOqxyrKdGE9q/qfinEzVV3gGstLkFs+Ai7ceZAuCp5BdQhjp3S\nWYFWUO9HsyAUkoxcTIzk7gXiRUsHGU7p0VB9gE3QJxl7N0k+eYQbUW1mzhBN\nltr6\r\n=QD5T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCghEL2IW+yb8OMuO/THZ0l5JncuieiZX4nbBP06q0zpQIhAOPjdNtOBvxevL7RDmDpxk6LsLtHnabp6gzaCUn/ReI9"}]},"maintainers":[{"name":"sarink","email":"sarink87@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lodash-redux-immutability_0.0.1_1524534801067_0.7884373047308255"},"_hasShrinkwrap":false},"0.0.2":{"name":"lodash-redux-immutability","author":{"name":"https://sarink.net"},"version":"0.0.2","description":"Lean immutable wrappers around lodash get/set/update/delete, especially helpful for redux reducers.","main":"dist/lodash-redux-immutability/lodash-redux-immutability","types":"dist/lodash-redux-immutability/lodash-redux-immutability","scripts":{"start:dev":"webpack-dev-server","lint":"tslint --project src/lodash-redux-immutability","lint:watch":"SHELL=/bin/bash chokidar webpack.config.* tslint.json tsconfig.json ./**/*.ts ./**/*.tsx -c \"npm run lint\" --initial --verbose","lint:fix":"tslint --project src/lodash-redux-immutability --fix","build:prod":"tsc --project src/lodash-redux-immutability"},"keywords":["lodash immutable set","lodash immutable update","lodash","immutable","redux","helper","immutable set","immutable update"],"repository":{"type":"git","url":"git+https://github.com/sarink/lodash-redux-immutability.git"},"license":"MIT","bugs":{"url":"https://github.com/sarink/lodash-redux-immutability/issues"},"homepage":"https://github.com/sarink/lodash-redux-immutability#readme","dependencies":{"lodash.clone":"^4.5.0","lodash.get":"^4.4.2","lodash.isempty":"^4.4.0","lodash.isnumber":"^3.0.3","lodash.isstring":"^4.0.1","lodash.setwith":"^4.3.2","lodash.unset":"^4.5.2"},"peerDependencies":{},"devDependencies":{"@types/chai":"^4.1.3","@types/lodash.clone":"^4.5.3","@types/lodash.get":"^4.4.3","@types/lodash.isempty":"^4.4.3","@types/lodash.isnumber":"^3.0.3","@types/lodash.isstring":"^4.0.3","@types/lodash.setwith":"^4.3.3","@types/lodash.unset":"^4.5.3","@types/mocha":"^5.0.0","@types/node":"^9.6.5","@types/webpack":"^4.1.3","@types/webpack-dev-server":"^2.9.4","chai":"^4.1.2","chokidar":"^2.0.3","chokidar-cli":"^1.2.0","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11","html-webpack-plugin":"^3.2.0","mocha":"^5.0.5","source-map-loader":"^0.2.3","style-loader":"^0.21.0","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.8.0","typescript":"^2.8.1","webpack":"^3.8.1","webpack-dev-server":"^2.9.4"},"gitHead":"61dcee75fd281027bca91b8ad7e1859b497696d4","_id":"lodash-redux-immutability@0.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"sarink","email":"sarink87@gmail.com"},"dist":{"integrity":"sha512-ZWX9igifQUmtNCE8htRzgR4HYJEaglgA3WJf/Ca8iOW9kc1CK9aGN1anoMRob5TuBReIrLNniTxI4i/QBXHFTg==","shasum":"9f7f3d4a2cd8f0eb21289a521771d6ac7262e233","tarball":"https://registry.npmjs.org/lodash-redux-immutability/-/lodash-redux-immutability-0.0.2.tgz","fileCount":21,"unpackedSize":29150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3pbUCRA9TVsSAnZWagAAzdwP/jusWps9RBhVIQXQxlEh\n0r+E8gXpKeC309Bn0bcJ1LzUtW2o7JGk8AlM1JKY4N1rlf4rMVi2EadRjuXD\nxfF5XX1Q74UDF1NSLw3dJYn5kMEDvdOayFgncW1C7PZG6Ch1G9J+fuAk5+hg\nMWmvxOjQCyshWTA3XfU3zVpFCfiFRX/7hpkmCw2IlFv4LlCulUtYCuXRGqdT\np940/+/EJtBru89Ds6NCX4yjweRVUhBbw3qV2ACteWvCJdoSpgbitAyhUYDg\n0i33hdvWyZYLBMHNn9/f6KsFiyKuUEBZeNO70WGTAbvqLOvPtFZBWHxDyAtQ\nzlGhAaD1uKnlnO6kLhNNhD2YmZQVWHVWJcUxNLpI1jf+hkejDJzoTt2B1bHd\nfW+5k71TGYmWbktCJnsXZKwL3v7PPMCObKjNvSeS76SGgsd3cRlKdfvTL7vd\n9NuqY6zqkoxK2vLaJB4n09In9zx/KfBpseZCxSuq1qoxTn+PR0gMwpCIIlbR\nLlkgCPRdHU2I8OoOxFWLn0Cc7OwJXlcFPqdO1hmqx4C9A2DkXioloNpv9DLZ\n1BqUx5yXFuZBIeWIg5lDRt4yoe4YuhtLrUuyKp/DycfrM5d1Lh2ckMnc+uPN\n7pMGp6AF9ZUZJuyGGcr2q1erxy5Oe+lPdpNYdBo757ongSxQWGn7QF6lv1qG\nmqss\r\n=WY+7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBUqbZ4vLujQXo6qe3YRkJzrMUraF8o0np7SrzpdtAnAiEAx3wArrryJFqq8snrMdFn3b4tnqd8JWq9/tA19F4iMNY="}]},"maintainers":[{"name":"sarink","email":"sarink87@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lodash-redux-immutability_0.0.2_1524537044195_0.7407895280847734"},"_hasShrinkwrap":false},"0.0.3":{"name":"lodash-redux-immutability","author":{"name":"https://sarink.net"},"version":"0.0.3","description":"Lean immutable wrappers around lodash get/set/update/delete, especially helpful for redux reducers.","main":"dist/lodash-redux-immutability/lodash-redux-immutability.js","types":"dist/lodash-redux-immutability/lodash-redux-immutability.d.ts","scripts":{"start:dev":"webpack-dev-server","lint":"tslint --project src/lodash-redux-immutability","lint:watch":"SHELL=/bin/bash chokidar webpack.config.* tslint.json tsconfig.json ./**/*.ts ./**/*.tsx -c \"npm run lint\" --initial --verbose","lint:fix":"tslint --project src/lodash-redux-immutability --fix","build:prod":"tsc --project src/lodash-redux-immutability"},"keywords":["lodash immutable set","lodash immutable update","lodash","immutable","redux","helper","immutable set","immutable update"],"repository":{"type":"git","url":"git+https://github.com/sarink/lodash-redux-immutability.git"},"license":"MIT","bugs":{"url":"https://github.com/sarink/lodash-redux-immutability/issues"},"homepage":"https://github.com/sarink/lodash-redux-immutability#readme","dependencies":{"lodash.clone":"^4.5.0","lodash.get":"^4.4.2","lodash.isempty":"^4.4.0","lodash.isnumber":"^3.0.3","lodash.isstring":"^4.0.1","lodash.setwith":"^4.3.2","lodash.unset":"^4.5.2"},"peerDependencies":{},"devDependencies":{"@types/chai":"^4.1.3","@types/lodash.clone":"^4.5.3","@types/lodash.get":"^4.4.3","@types/lodash.isempty":"^4.4.3","@types/lodash.isnumber":"^3.0.3","@types/lodash.isstring":"^4.0.3","@types/lodash.setwith":"^4.3.3","@types/lodash.unset":"^4.5.3","@types/mocha":"^5.0.0","@types/node":"^9.6.5","@types/webpack":"^4.1.3","@types/webpack-dev-server":"^2.9.4","chai":"^4.1.2","chokidar":"^2.0.3","chokidar-cli":"^1.2.0","clean-webpack-plugin":"^0.1.19","css-loader":"^0.28.11","html-webpack-plugin":"^3.2.0","mocha":"^5.0.5","source-map-loader":"^0.2.3","style-loader":"^0.21.0","ts-loader":"^3.5.0","tslint":"^5.9.1","tslint-config-airbnb":"^5.8.0","typescript":"^2.8.1","webpack":"^3.8.1","webpack-dev-server":"^2.9.4"},"gitHead":"bbca17aa9f037203f5d50f1551f84ea6d0bf3819","_id":"lodash-redux-immutability@0.0.3","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"sarink","email":"sarink87@gmail.com"},"dist":{"integrity":"sha512-vED045DuLV440rbUfZ6nklAPrm1tMbwt9KHt4Ka8P14E5nSNmIX7dUWd08EYQZVE3snCAg0GyrsQgLR3JfNF8Q==","shasum":"fcd8fe33c85dcbd272e4c6018ce4a9227f679625","tarball":"https://registry.npmjs.org/lodash-redux-immutability/-/lodash-redux-immutability-0.0.3.tgz","fileCount":21,"unpackedSize":29158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa3pdgCRA9TVsSAnZWagAACwkP/A+rqpVogF1ZYKIJtj1k\nwC+m9Vokl7yMZyRvLxJ1PAyr/jmPIDOdEOApDb7n/nA4tqO4x1928Cb2hcua\n8kit2WWvemF639ssoei0+FJjYZlxAj/CUHnMna1IxUtc4t6/jLanEjfuQ604\n4CKrA0zULOy3DxC74iE9juABabE7SJmb1sYbmD8ONzk0C/9EUHs3au+/XXEk\nZzuxVHKJBZfV7eutNYz/Bxg7m39TKxZQCO3SJbJe1g+jaiArIFeuwTpCa8OJ\nQAe4FXq19KHbMrGJxMVevtrp8ExFttfAfJGQmF/8p+G5GbEiyk7jLeLvnTL9\nPu3mm964DG7rq3ukAoptUEGs8NU+kL+akuxlbba8dbMLxIWj57Xtpm0nUotP\nqSOYgO2DeXJ0Z136VAuZEGuS92bkubvqLgMaeQXdH7u6wOs8+eGV+sQ+Sfx2\nv6/Dm/owpBefLqj1m/j+UAvombuc+d+FsEEWy+b2UvQRZDpn8l0o309FVy3U\n59M74rnGD3Zb2i+kvSV7PjMciz0MqBe7Fb+4J+/zvKtljJ7Qj118iwVT3p/9\nhref/DNX1hpRuKK8nw9ta6I03i2rFO+xgQZWssEc1HyzLorC/d3S9iBeiH9S\nw8mv3KRbhwVeBGVMNIBT22VE6Np/0YgenkusE+GkjrsOtbcqoLYV3HzW+hAE\nztKf\r\n=W/fT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDWZajtJlTJPGY+pBc966O2QhbpyVZpl6szYz59JHD1zwIhAIskBMtTxkqGW3I0v/MKva+2JXOzguVn+EaSfZ3eEQci"}]},"maintainers":[{"name":"sarink","email":"sarink87@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lodash-redux-immutability_0.0.3_1524537183734_0.22726380514543254"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-24T01:53:21.066Z","0.0.1":"2018-04-24T01:53:21.502Z","modified":"2022-05-08T08:01:59.198Z","0.0.2":"2018-04-24T02:30:44.254Z","0.0.3":"2018-04-24T02:33:03.804Z"},"maintainers":[{"name":"sarink","email":"sarink87@gmail.com"}],"description":"Lean immutable wrappers around lodash get/set/update/delete, especially helpful for redux reducers.","homepage":"https://github.com/sarink/lodash-redux-immutability#readme","keywords":["lodash immutable set","lodash immutable update","lodash","immutable","redux","helper","immutable set","immutable update"],"repository":{"type":"git","url":"git+https://github.com/sarink/lodash-redux-immutability.git"},"author":{"name":"https://sarink.net"},"bugs":{"url":"https://github.com/sarink/lodash-redux-immutability/issues"},"license":"MIT","readme":"# lodash-redux-immutability\nLean (just 24 lines of code!) immutable wrappers around lodash get/set/update/delete, especially helpful for redux reducers.\n\n\n## Install\n```\nnpm install lodash-redux-immutability --save\n```\n\n\n## Dependencies\n```\nlodash.clone;\nlodash.get;\nlodash.isempty;\nlodash.isnumber;\nlodash.isstring;\nlodash.setwith;\nlodash.unset;\n```\n\n\n## Test coverage\n✅ 100%\n\n\n## Gotchas\nWhen setting/updating, passing a number (ie, `3`) in your `path` will look for an array at index 3 , but passing a \"string-number\" (ie, `'3'`) will look for an object with a key of '3'.\n<br/>\n[Source](https://github.com/sarink/lodash-redux-immutability/blob/master/src/lodash-redux-immutability/lodash-redux-immutability.ts#L21)\n|\n[Tests](https://github.com/sarink/lodash-redux-immutability/blob/master/src/tests/updateIn-tests.ts#L87-L204)\n\n\n## API\n\n### updateIn(state:Object, path:Array<string|number>, valueToUpdate:Object)\nMerges (spreads) `valueToUpdate` at `path` inside of `state` with the current value found at this path, creating any keys in path that do not exist, returning a new object where affected objects in the path have a new reference.\n\n[Source](https://github.com/sarink/lodash-redux-immutability/blob/master/src/lodash-redux-immutability/lodash-redux-immutability.ts#L27)\n|\n[Tests](https://github.com/sarink/lodash-redux-immutability/blob/master/src/tests/updateIn-tests.ts)\n|\nExample:\n```\nimport { updateIn } from 'lodash-redux-immutability';\nconst state = {\n  stores: {\n    '3': {\n      name: 'three'\n    '4': {\n      name: 'four'\n    }\n  }\n};\nconst storeThreeUpdates = { location: 'Third street' };\nconst newState = updateIn(state, ['stores', '3'], storeThreeUpdates);\nnewState.stores['3']; // { name: 'three', 'location: 'Third street' };\nnewState.stores === state.stores; // false\nnewState.stores['3'] === state.stores['3']; // false\nnewState.stores['4'] === state.stores['4']; // true\n```\n\n\n### setIn(state:Object, path:Array<string|number>, valueToSet:any)\nReplaces `valueToSet` at `path` inside of `state`, creating any keys in path that do not exist, returning a new object where affected objects in the path have a new reference.\n\n[Source](https://github.com/sarink/lodash-redux-immutability/blob/master/src/lodash-redux-immutability/lodash-redux-immutability.ts#L17)\n|\n[Tests](https://github.com/sarink/lodash-redux-immutability/blob/master/src/tests/setIn-tests.ts)\n|\nExample:\n```\nimport { setIn } from 'lodash-redux-immutability';\nconst state = {\n  stores: {\n    '3': {\n      name: 'three'\n    }\n    '4': {\n      name: 'four'\n    }\n  }\n};\nconst newState = setIn(state, ['stores', '3', 'name'], 'tres');\nnewState.stores['3']; // { name: 'tres' }\nnewState.stores === state.stores; // false\nnewState.stores['3'] === state.stores['3']; // false\nnewState.stores['4'] === state.stores['4']; // true\n```\n\n\n### deleteIn(state:Object, path:Array<string|number>)\nDeletes the value at `path` inside of `state`, returning a new object where affected objects in the path have a new reference.\n\n[Source](https://github.com/sarink/lodash-redux-immutability/blob/master/src/lodash-redux-immutability/lodash-redux-immutability.ts#L34)\n|\n[Tests](https://github.com/sarink/lodash-redux-immutability/blob/master/src/tests/deleteIn-tests.ts)\n|\nExample:\n```\nimport { deleteIn } from 'lodash-redux-immutability';\nconst state = {\n  '3': {\n    name: 'three'\n  },\n  '4': {\n    name: 'four'\n  }\n};\nconst newState = deleteIn(state, ['stores', '3'];\nnewState.stores['3']; // undefined\nnewState.stores === state.stores; // false\nnewState.stores['4'] === state.stores['4']; // true\n```\n\n\n### getIn(state:Object, path:Array<string|number>, defaultValue?:any)\nGet a value from an object by path. Returns the value, unless path is an empty [], in which case returns the original object\n\n[Source](https://github.com/sarink/lodash-redux-immutability/blob/master/src/lodash-redux-immutability/lodash-redux-immutability.ts#L13)\n|\n[Tests](https://github.com/sarink/lodash-redux-immutability/blob/master/src/tests/getIn-tests.ts)\n|\nExample:\n```\nimport { getIn } from 'lodash-redux-immutability';\nconst state = {\n  stores: {\n    '3': {\n      name: 'three'\n    }\n  }\n};\nconst storeThreeName = getIn(state, ['stores', '3', 'name']); // 'three'\nconst entireState = getIn(state, []); // the entire 'state' object (this is what makes `getIn` different from the traditional `_.get`)\n```\n\n## License\nMIT\n","readmeFilename":"README.md"}