argsarray
get arguments to a function as an array, withouth deoptimizing
Last updated 11 years ago by cwmma .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ npm install argsarray 
SYNC missed versions from official npm registry.

args array Build Status

npm install argsarray

simple library to treat function arguments as an array without leaking the arguments object (which is bad), based on something I wrote for PouchDB.

Simple wrap a function in this and the function will always be called with an array of the arguments it was called with.

var myFunc = argsarray(function myFunc(args) {
  console.log(args);
});

myFunc(a, b, c);
//[a, b, c];

#license

wtfpl

Current Tags

  • 0.0.1                                ...           latest (11 years ago)

1 Versions

  • 0.0.1                                ...           11 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE