Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.
npm install upsert-value> Update or set nested values and any intermediaries with dot notation ('a.b.c') paths.
Install with npm
``sh`
$ npm i upsert-value --save
`js`
var upsert = require('upsert-value');
Update or set a value on the given object with the given key path.
Params
* obj {Object}: Object to update/set.path
* {String}: Key path to update/set.value
{}: Value to update/set.returns
* {Object}: Update object.
Example
`js`
var obj = {};
upsert(obj, 'a.b.c', 'foo');
//=> {a: {b: {c: 'foo'}}}
* has-value: Returns true if a value exists, false if empty. Works with deeply nested values using… more
* put-value: Update only existing values fromn an object, works with dot notation paths like a.b.c and… more'a.b.c'
* set-value: Create nested values and any intermediaries using dot notation () paths.
Install dev dependencies:
`sh``
$ npm i -d && npm test
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Brian Woodward
Copyright © 2015 Brian Woodward
Released under the MIT license.
*
_This file was generated by verb-cli on July 09, 2015._