Gathering detailed insights and metrics for unset-value
Gathering detailed insights and metrics for unset-value
Gathering detailed insights and metrics for unset-value
Gathering detailed insights and metrics for unset-value
Delete nested properties from an object using dot notation.
npm install unset-value
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
35 Stars
24 Commits
12 Forks
4 Watchers
1 Branches
7 Contributors
Updated on May 27, 2025
Latest Version
2.0.1
Package Id
unset-value@2.0.1
Unpacked Size
9.65 kB
Size
3.60 kB
File Count
5
NPM Version
6.14.14
Node Version
14.17.5
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
Delete nested properties from an object using dot notation.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
1$ npm install --save unset-value
1var unset = require('unset-value'); 2unset(obj, prop);
obj
{object}: The object to unset prop
onprop
{string | string[]}: The property to unset. Dot-notation may be used or an array of nested properties.1var obj = {a: 'b'}; 2unset(obj, 'a'); 3console.log(obj); 4//=> {}
1unset({a: 'b'}, 'a') // true
true
when a property does not existThis is consistent with delete
behavior in that it does not
throw when a property does not exist.
1unset({a: {b: {c: 'd'}}}, 'd') // true
1var one = {a: {b: {c: 'd'}}}; 2unset(one, 'a.b'); 3console.log(one); 4//=> {a: {}} 5 6var two = {a: {b: {c: 'd'}}}; 7unset(two, ['a', 'b', 'c']); 8console.log(two); 9//=> {a: {b: {}}} 10 11var three = {a: {b: {c: 'd', e: 'f'}}}; 12unset(three, 'a.b.c'); 13console.log(three); 14//=> {a: {b: {e: 'f'}}}
1unset(); 2// 'expected an object.'
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
a.b.c
and… more | homepage'a.b.c'
) paths. | homepage'a.b.c'
) paths. | homepageCommits | Contributor |
---|---|
11 | jonschlinkert |
4 | danez |
2 | wtgtybhertgeghgtwtg |
1 | TrySound |
1 | bluelovers |
Jon Schlinkert
Copyright © 2021, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.8.0, on March 18, 2021.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/21 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More