argsarray
get arguments to a function as an array, withouth deoptimizing
Last updated 7 years ago by cwmma .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (7 years ago)

1 Versions

  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 85
This Week 177
This Month 85
Last Day 92
Last Week 678
Last Month 2,291
Dependencies (0)
None
Dev Dependencies (3)
Dependents (90)

Copyright 2014 - 2016 © taobao.org |