slice-arguments
slice arguments and common helpers
Installing
npm install slice-arguments
component install stagas/slice-arguments
Example
var slice = ; { var args = slice; // or just: slice(arguments) // get all values except callback if present console; // => [ 'Hello' ] // get the callback if present console; // => [Function] // decorate callback var fn = args; bar;} { ;} ;
API
slice(arguments)
slice.call(arguments)
Returns arguments in an array.
.callback([fn])
Returns the callback if present, or a noop
function, and optionally replaces with fn
.
.values()
Returns the arguments minus the callback if present.
License
MIT