
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
upsert-value
Advanced tools
Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.
Update or set nested values and any intermediaries with dot notation (
'a.b.c') paths.
Install with npm
$ npm i upsert-value --save
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
var obj = {};
upsert(obj, 'a.b.c', 'foo');
//=> {a: {b: {c: 'foo'}}}
a.b.c and… more'a.b.c') paths.Install dev dependencies:
$ 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.
FAQs
Update or set nested values and any intermediaries with dot notation (`'a.b.c'`) paths.
The npm package upsert-value receives a total of 7 weekly downloads. As such, upsert-value popularity was classified as not popular.
We found that upsert-value demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.