You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Björn
b963b3396c
|
4 years ago | |
---|---|---|
.. | ||
test | 4 years ago | |
.jshintrc | 4 years ago | |
.npmignore | 4 years ago | |
.travis.yml | 4 years ago | |
index.js | 4 years ago | |
license.md | 4 years ago | |
package.json | 4 years ago | |
readme.md | 4 years ago |
readme.md
args array
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