
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.
🈳 Checking or pruning the empty value.
npm i emptying
Check if a value is empty. Includes undefined, null, empty string, NaN, empty array, empty object, empty Set, empty Map, or array/set/map/object with empty values.
import { isEmptyValue } from 'emptying';
isEmptyValue(undefined); // true
isEmptyValue(null); // true
isEmptyValue(NaN); // true
isEmptyValue(''); // true
isEmptyValue(['']); // true
isEmptyValue([{ a: '' }]); // true
isEmptyValue([{ a: { b: { c: undefined } } }]); // true
isEmptyValue(new Set()); // true
isEmptyValue(new Set([''])); // true
isEmptyValue(new Map()); // true
isEmptyValue(new Map([['a', null]])); // true
isEmptyValue({}); // true
isEmptyValue({ a: null }); // true
isEmptyValue({ a: { b: { c: undefined } } }); // true
isEmptyValue(0); // false
isEmptyValue(true); // false
isEmptyValue(false); // false
isEmptyValue('a'); // false
isEmptyValue(['a']); // false
isEmptyValue([{ a: 'a' }]); // false
isEmptyValue(new Set([1])); // false
isEmptyValue(new Map([['a', 1]])); // false
isEmptyValue({ a: 1 }); // false
isEmptyValue({ a: 1, b: null }); // false
What does empty value mean?
An empty value is data that does not need to be saved. For example, data that the API does not want to receive, or meaningless data that wastes storage space.
undefinednull''NaN[]new Setnew Map{}What kind of data is not empty?
0' 'Why divide data this way?
I often need to filter the data before saving it. Data needs to be discarded or nulled when it doesn't make sense, regardless of how deep it is in the hierarchy.
FAQs
Checking or pruning the empty value.
We found that emptying 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.