callbacker
Parse the last argument in a function as the callback function
Install
npm install callbacker --save
Usage
var callbacker = ; { var args = ; var arg1 = args; args;} ;
Methods
at(index)
Returns the argument at that index. Returns null
if argument is the callback. Use args.callback
to access the callback.
callback()
Returns the last item in the arguments array if it is a function. Assumes the "node-style" callback-as-last-argument structure.
Run Tests
npm install
npm test