{"_id":"toxic","_rev":"286020","name":"toxic","description":"Mutate keys and values in objects. Returns a new version of the object","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"scottcorgan","email":""}],"time":{"modified":"2023-09-20T21:43:58.000Z","created":"2014-11-17T21:18:10.786Z","1.0.1":"2018-06-15T18:35:09.757Z","1.0.0":"2014-11-17T21:18:10.786Z"},"users":{},"author":{"name":"Scott Corgan"},"repository":{"type":"git","url":"git+https://github.com/scottcorgan/toxic.git"},"versions":{"1.0.1":{"name":"toxic","version":"1.0.1","description":"Mutate keys and values in objects. Returns a new version of the object","main":"index.js","scripts":{"test":"node test.js | tap-spec"},"repository":{"type":"git","url":"git+https://github.com/scottcorgan/toxic.git"},"keywords":["globject","glob","minimatch","map","slash"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/toxic/issues"},"homepage":"https://github.com/scottcorgan/toxic","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"lodash":"^4.17.10"},"gitHead":"c5fde5ed37e71e58288f2b87c512dbfa3e88aa3f","_id":"toxic@1.0.1","_npmVersion":"6.1.0","_nodeVersion":"8.9.1","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"dist":{"shasum":"8c2e2528da591100adc3883f2c0e56acfb1c7288","size":2117,"noattachment":false,"key":"/toxic/-/toxic-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/toxic/download/toxic-1.0.1.tgz"},"maintainers":[{"name":"scottcorgan","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/toxic_1.0.1_1529087709629_0.44175591793907554"},"_hasShrinkwrap":false,"publish_time":1529087709757,"_cnpm_publish_time":1529087709757,"_cnpmcore_publish_time":"2021-12-14T04:26:01.731Z"},"1.0.0":{"name":"toxic","version":"1.0.0","description":"Mutate keys and values in objects. Returns a new version of the object","main":"index.js","scripts":{"test":"node test.js | tap-spec"},"repository":{"type":"git","url":"https://github.com/scottcorgan/toxic.git"},"keywords":["globject","glob","minimatch","map","slash"],"author":{"name":"Scott Corgan"},"license":"MIT","bugs":{"url":"https://github.com/scottcorgan/toxic/issues"},"homepage":"https://github.com/scottcorgan/toxic","devDependencies":{"tap-spec":"^1.0.1","tape":"^3.0.3"},"dependencies":{"lodash":"^2.4.1"},"gitHead":"5ab718b0321bf3c225ead4be52de8b43bf85739b","_id":"toxic@1.0.0","_shasum":"f1154d8b6ac21875ac943a9f7408df2dfe164ea2","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.31","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":""}],"dist":{"shasum":"f1154d8b6ac21875ac943a9f7408df2dfe164ea2","size":2499,"noattachment":false,"key":"/toxic/-/toxic-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/toxic/download/toxic-1.0.0.tgz"},"directories":{},"publish_time":1416259090786,"_hasShrinkwrap":false,"_cnpm_publish_time":1416259090786,"_cnpmcore_publish_time":"2021-12-14T04:26:01.945Z"}},"readme":"# toxic\n\nMutate keys and values in objects. Returns a new version of the object\n\n## Install\n\n```\nnpm install toxic --save\n```\n\n## Usage\n\n```js\nvar toxic = require('toxic');\n\nvar mutatedObject = toxic({\n  key1: 'value1',\n  key2: 'value2'\n}, {\n  mutator: function (val) {\n    return val + '...'\n  }\n});\n\nconsole.log(mutatedObject);\n// OUTPUTS:\n// {\n//   'key1...': 'value1...',\n//   'key2...': 'value2...'\n// }\n```\n\n## API\n\n### toxic(object[, options])\n\n* `object` - The object to perform mutations on.\n* `options `\n  * `mutator` - Function that gets passed the current key or value. Default returns the value, as is.\n  * `keyMutator` - Function used ot mutate the keys. Overrides `mutator`.\n  * `valueMutator` - Function used ot mutate the values. Overrides `mutator`.\n\n## Run Tests\n\n```\nnpm install\nnpm test\n```\n","_attachments":{},"homepage":"https://github.com/scottcorgan/toxic","bugs":{"url":"https://github.com/scottcorgan/toxic/issues"},"license":"MIT"}