Quickly check if a variable is an Arguments object

npm install is-args
11 downloads in the last day
29 downloads in the last week
205 downloads in the last month


Quickly check if a variable is Arguments.

var isArgs = require('is-args');

isArgs((function () { return arguments; })(1, 2, 3));
// true;

isArgs([1, 2, 3]);
// false;


$ npm install is-args


This is not the standard === '[object Arguments]' method. This method is much faster than the toString method, however, there is a chance that you may get false positives on objects that resemble arguments:

var x = [1,2,3];
x.callee = function () {};

// true

Keep this in mind as you work with this module.

npm loves you