JSPM

argsarray

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 117054
  • Score
    100M100P100Q167843F
  • License WTFPL

get arguments to a function as an array, withouth deoptimizing

Package Exports

  • argsarray

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (argsarray) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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