{"_id":"put-value","_rev":"2787522","name":"put-value","description":"Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"time":{"modified":"2022-06-22T03:09:45.000Z","created":"2015-06-25T09:52:13.288Z","0.1.0":"2015-07-09T20:47:09.990Z","0.0.0":"2015-06-25T09:52:13.288Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/tunnckocore/put-value.git"},"versions":{"0.1.0":{"name":"put-value","version":"0.1.0","description":"Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/put-value.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"assign-deep":"~0.1.2","has-own-deep":"~0.1.4","isobject":"~1.0.0","kind-of":"~2.0.0","lazy-cache":"~0.1.0","set-value":"~0.2.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":["dot","notation","object","path","props","update","val","values"],"gitHead":"0a0269799b1e691f4a76c618c8a792d8f7ea62c4","bugs":{"url":"https://github.com/tunnckocore/put-value/issues"},"homepage":"https://github.com/tunnckocore/put-value#readme","_id":"put-value@0.1.0","_shasum":"8c61bf76d1b7e665f0e5731dace31067294c5c78","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"8c61bf76d1b7e665f0e5731dace31067294c5c78","size":4342,"noattachment":false,"key":"/put-value/-/put-value-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/put-value/download/put-value-0.1.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T14:20:27.607Z","publish_time":1436474829990,"_cnpm_publish_time":1436474829990},"0.0.0":{"name":"put-value","version":"0.0.0","description":"Update only existing values fromn an object, works with dot notation paths like `a.b.c` and support deep nesting","repository":{"type":"git","url":"git+https://github.com/tunnckocore/put-value.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"assign-deep":"^0.1.2","has-own-deep":"^0.1.4","isobject":"^1.0.0","kind-of":"^2.0.0","lazy-cache":"^0.1.0","set-value":"^0.2.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":[],"bugs":{"url":"https://github.com/tunnckocore/put-value/issues"},"homepage":"https://github.com/tunnckocore/put-value#readme","_id":"put-value@0.0.0","_shasum":"75cfaa07b13bd964de8f2b03790b583917c4feb7","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"75cfaa07b13bd964de8f2b03790b583917c4feb7","size":3774,"noattachment":false,"key":"/put-value/-/put-value-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/put-value/download/put-value-0.0.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T14:20:26.721Z","publish_time":1435225933288,"_cnpm_publish_time":1435225933288}},"readme":"# put-value [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Update only existing values from an object, works with dot notation paths like `a.b.c` and support deep nesting.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n\n## Features\n- updates value of `key` only if `key` exists\n- updates only existing values of `obj` when object is given to `key`\n- because `set-value` **update** values if exist and **add** if not exist\n- returns original object if `key` is not an object or string\n- returns empty object if `obj` is not an object\n- returns modified object otherwise\n\n\n## Install\n```\nnpm i put-value --save\nnpm test\n```\n\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nvar put = require('put-value')\nvar obj = {\n  a: {\n    foo: 'bar'\n  },\n  b: {\n    bb: 'bbb'\n  }\n}\n\nput(123) //=> empty object {}\nput(obj, {a: {bar: 'baz'}}) //=> original `obj`\nput(obj, {a: 'foo'}})\n//=> {\n//   a: 'foo',\n//   b: {\n//     bb: 'bbb'\n//   }\n// }\n\nput(obj, {zzz: 'xxx'}) //=> original `obj`\nput(obj, 'foo', 'baz') //=> original `obj`\nput(obj, 'foo.bar', 'baz') //=> original `obj`\nput(obj, 'a', {foo: 123})\n//=> {\n//   a: {\n//     foo: 123\n//   },\n//   b: {\n//     bb: 'bbb'\n//   }\n// }\n\nput(obj, 'a.foo', {baz: 'aaa'})\n//=> {\n//   a: {\n//     foo: {\n//       baz: 'aaa'\n//     }\n//   },\n//   b: {\n//     bb: 'bbb'\n//   }\n// }\n```\n\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/put-value/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckocore.tk][author-www-img]][author-www-url] [![keybase tunnckocore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n\n[npmjs-url]: https://www.npmjs.com/package/put-value\n[npmjs-img]: https://img.shields.io/npm/v/put-value.svg?label=put-value\n\n[license-url]: https://github.com/tunnckoCore/put-value/blob/master/LICENSE.md\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/put-value\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/put-value.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/put-value\n[travis-img]: https://img.shields.io/travis/tunnckoCore/put-value.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/put-value\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/put-value.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/put-value\n[david-img]: https://img.shields.io/david/tunnckoCore/put-value.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n\n[author-www-url]: http://www.tunnckocore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/messages\n[new-message-img]: https://img.shields.io/badge/send%20me-message-green.svg\n","_attachments":{},"homepage":"https://github.com/tunnckocore/put-value#readme","bugs":{"url":"https://github.com/tunnckocore/put-value/issues"},"license":"MIT"}