
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.
is-arguments
Advanced tools
The is-arguments npm package is designed to check if a given value is an arguments object. This can be particularly useful in functions where you need to differentiate between an array and the arguments object, or when trying to ensure compatibility across different JavaScript environments where the typeof operator might not suffice.
Check if a value is an arguments object
This feature allows you to check if a given value is an arguments object. It's particularly useful in scenarios where you need to distinguish between an array and the arguments object passed to a function.
const isArguments = require('is-arguments');
function example() {
console.log(isArguments(arguments)); // true
console.log(isArguments([1, 2, 3])); // false
}
example();
Similar to is-arguments, isarray checks if a given value is an array. While is-arguments focuses on identifying arguments objects, isarray focuses on arrays. Both packages serve to identify specific data structures, making them useful in different but somewhat related scenarios.
Part of the Lodash library, lodash.isarguments provides a similar functionality to is-arguments by checking if a value is an arguments object. The main difference is that lodash.isarguments comes as part of the larger Lodash utility library, which offers a wide range of functions for different types of data manipulation and checking.
Is this an arguments object? It's a harder question than you think.
var isArguments = require('is-arguments');
var assert = require('assert');
assert.equal(isArguments({}), false);
assert.equal(isArguments([]), false);
(function () {
assert.equal(isArguments(arguments), true);
}())
If you have modified an actual arguments
object by giving it a Symbol.toStringTag
property, then this package will return false
.
Simply clone the repo, npm install
, and run npm test
v1.2.0 - 2024-12-12
ff7c948
5fe6c6e
npmignore
to autogenerate an npmignore file 9a9b0cf
74c5c49
eslint
, @ljharb/eslint-config
, safe-publish-latest
, tape
d9a932d
0f726b6
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, tape
ea21450
eaad2ab
2be15d3
29b929c
@ljharb/eslint-config
, auto-changelog
, npmignore
, tape
8a38bf5
@ljharb/eslint-config
, safe-publish-latest
, tape
841627d
call-bound
directly e429257
call-bind
, has-tostringtag
c0db6a8
aud
with npm audit
f589983
sideEffects
flag 2e15793
0ffe01b
FAQs
Is this an arguments object? It's a harder question than you think.
The npm package is-arguments receives a total of 21,612,804 weekly downloads. As such, is-arguments popularity was classified as popular.
We found that is-arguments demonstrated a healthy version release cadence and project activity because the last version was released less than 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 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.