
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Check whether a value is empty.
$ npm install is-empty
$ npm test
var empty = require('is-empty');
empty([]); // true
empty({}); // true
empty(''); // true
empty(0); // true
empty(function(){}); // true
empty(null); // true
empty(undefined); // true
empty(new Map()); // true
empty(new Set()); // true
empty(new Error()); // true
empty(true); // false
empty(false); // false
empty(['a', 'b']); // false
empty({ a: 'b' }); // false
empty('string'); // false
empty(42); // false
empty(function(a,b){}); // false
empty(new Map([['key', 'value']])); // false
empty(new Set([1])); // false
empty(new Error('fail'))// false
Check whether value
is empty.
MIT
FAQs
Check whether a value is "empty".
The npm package is-empty receives a total of 369,340 weekly downloads. As such, is-empty popularity was classified as popular.
We found that is-empty demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.