Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
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.1.0 - 2020-12-04
fd59a37
982a0d6
jscs
927d4b5
auto-changelog
ef0634b
node
v12.10
, v11.15
, v10.16
, v8.16
, v6.17
1689f8b
node
v11.7
, v10.15
, v8.15
, v6.16
145aaeb
cc484a3
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, tape
c888738
nyc
on all tests 0de8efb
818775a
call-bind
31d0199
0c55f7d
ca7ed59
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
1ae5053
eslint
, @ljharb/eslint-config
, tape
; add safe-publish-latest
433f4a5
eslint
, @ljharb/eslint-config
, covert
, tape
78ea4e8
npm audit
instead of nsp
07fb85b
eslint
, @ljharb/eslint-config
, tape
2204add
eslint
, @ljharb/eslint-config
, safe-publish-latest
ce150c0
ee45fc3
npx aud
instead of nsp
or npm audit
with hoops 03a312c
pull_request_target
event 25d2ef8
auto-changelog
, tape
0fe60b7
@ljharb/eslint-config
, tape
4a9cbd0
auto-changelog
; add aud
d9ff7d5
funding
field adec2d2
f474960
FAQs
Is this an arguments object? It's a harder question than you think.
The npm package is-arguments receives a total of 22,782,925 weekly downloads. As such, is-arguments popularity was classified as popular.
We found that is-arguments 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.