arguments-extended
arguments-extended
is a Javascript library that provides utilities for working with the arguments object. arguments-extended
can be used as a monad library or each function can be used standalone.
arguments-extended
can be used standalone or incorporated into extended
var args = ;
Or
var args = ;
Installation
npm install arguments-extended
Or download the source (minified)
Usage
toArray() argsToArray()
Function to convert arguments to an array. If you are using arguments-extended
as a monad use the toArray
method, if your using the standalone method use argsToArray
To use as a monad.
{ return value;} ; //["a", "b", "c"];
To use a a function
{ return args;} ; //["a", "b", "c"];
You may also specify a slice
argument to slice a number of arguments off of the front of returned array
{ return value;} ; //["b", "c"];
{ return args;} ; //["b", "c"];