{"_id":"upsert-value","_rev":"2786719","name":"upsert-value","description":"Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"}],"time":{"modified":"2022-06-22T03:05:37.000Z","created":"2015-07-09T20:51:46.770Z","0.1.0":"2015-07-09T20:51:46.770Z"},"users":{},"author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/upsert-value.git"},"versions":{"0.1.0":{"name":"upsert-value","description":"Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.","version":"0.1.0","homepage":"https://github.com/doowb/upsert-value","author":{"name":"Brian Woodward","url":"https://github.com/doowb"},"repository":{"type":"git","url":"git+https://github.com/doowb/upsert-value.git"},"bugs":{"url":"https://github.com/doowb/upsert-value/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"mocha":"*"},"dependencies":{"has-own-deep":"^0.1.4","lazy-cache":"^0.1.0","put-value":"^0.1.0","set-value":"^0.2.0"},"gitHead":"bc0b345cbbff6ab4ad6307258fc133338395f781","_id":"upsert-value@0.1.0","_shasum":"d1cb30e2ab4b94b0430ffbc61376259a6e5b453b","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.12.0","_npmUser":{"name":"doowb","email":"brian.woodward@gmail.com"},"dist":{"shasum":"d1cb30e2ab4b94b0430ffbc61376259a6e5b453b","size":2267,"noattachment":false,"key":"/upsert-value/-/upsert-value-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/upsert-value/download/upsert-value-0.1.0.tgz"},"maintainers":[{"name":"doowb","email":"brian.woodward@gmail.com"}],"directories":{},"_cnpmcore_publish_time":"2021-12-19T14:19:54.841Z","publish_time":1436475106770,"_cnpm_publish_time":1436475106770}},"readme":"# upsert-value [![NPM version](https://badge.fury.io/js/upsert-value.svg)](http://badge.fury.io/js/upsert-value)  [![Build Status](https://travis-ci.org/doowb/upsert-value.svg)](https://travis-ci.org/doowb/upsert-value)\n\n> Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i upsert-value --save\n```\n\n## Usage\n\n```js\nvar upsert = require('upsert-value');\n```\n\n## API\n\n<!-- add a path or glob pattern for files with code comments to use for docs  -->\n\n### [upsert](index.js#L32)\n\nUpdate or set a value on the given object with the given key path.\n\n**Params**\n\n* `obj` **{Object}**: Object to update/set.\n* `path` **{String}**: Key path to update/set.\n* `value` **{*}**: Value to update/set.\n* `returns` **{Object}**: Update object.\n\n**Example**\n\n```js\nvar obj = {};\nupsert(obj, 'a.b.c', 'foo');\n//=> {a: {b: {c: 'foo'}}}\n```\n\n## Related projects\n\n<!-- add an array of related projects, then un-escape the helper -->\n\n* [has-value](https://github.com/jonschlinkert/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value)\n* [put-value](https://github.com/tunnckocore/put-value#readme): Update only existing values fromn an object, works with dot notation paths like `  a.b.c` and… [more](https://github.com/tunnckocore/put-value#readme)\n* [set-value](https://github.com/jonschlinkert/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/upsert-value/issues/new)\n\n## Author\n\n**Brian Woodward**\n\n+ [github/doowb](https://github.com/doowb)\n+ [twitter/doowb](http://twitter.com/doowb)\n\n## License\n\nCopyright © 2015 Brian Woodward\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on July 09, 2015._","_attachments":{},"homepage":"https://github.com/doowb/upsert-value","bugs":{"url":"https://github.com/doowb/upsert-value/issues"},"license":"MIT"}