
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
dynamic-props-immutable
Advanced tools
dynamic-props-immutabledynamic-props-immutable allows to create and delete nested properties of object literals dynamically.
import { setNestedProp } from 'dynamic-props-immutable';
let foo = {};
foo = setNestedProp`bar.baz[${2}].qux`(foo, 'hello');
console.log(foo);
{ bar: { baz: [ <2 empty items>, { qux: 'hello' } ] } }
import { deleteNestedProp } from 'dynamic-props-immutable';
foo = deleteNestedProp`bar.baz[${2}].qux`(foo);
console.log(foo);
{ }
Note that by default deleteNestedProp recursively removes properties containing undefined values, empty objects, empty arrays or arrays containing only undefined values.
Multidimensional arrays are not supported.
You can get dynamic-props-immutable via npm.
$ npm install dynamic-props-immutable --save
FAQs
Set and delete nested properties
The npm package dynamic-props-immutable receives a total of 104 weekly downloads. As such, dynamic-props-immutable popularity was classified as not popular.
We found that dynamic-props-immutable 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.