is-arguments
Is this an arguments object? It's a harder question than you think.
Last updated 3 years ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-arguments 
SYNC missed versions from official npm registry.

is-arguments Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this an arguments object? It's a harder question than you think.

Example

var isArguments = require('is-arguments');
var assert = require('assert');

assert.equal(isArguments({}), false);
assert.equal(isArguments([]), false);
(function () {
	assert.equal(isArguments(arguments), true);
}())

Caveats

If you have modified an actual arguments object by giving it a Symbol.toStringTag property, then this package will return false.

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 1.1.1                                ...           latest (3 years ago)

8 Versions

  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (7)

Copyright 2013 - present © cnpmjs.org | Home |