Execon
Patterns of function calls.
Install
npm i execon --save
# or
bower i execon --save
Api
var exec = ;
exec
Check is parameter is function, if it's - executes it with given parameters
Was:
{ if typeof callback === 'function' ;}
Now
{ ;}
or just
exec;
exec.if
Conditional execution one of two functions
Preconditions:
{ console;} { ;}
Before:
if 2 > 3 ;else ;
After:
exec;
exec.parallel
if a you need a couple async operation do same work, and then call callback, this function for you.
Node.js example.
var fs = Util = ; exec;
Vanilla js example.
var ONE_SECOND = 1000 TWO_SECONDS = 2000 { ; } func1 = func func2 = func; exec;
exec.series
executes functions one-by-one
{ ;} { console; ;} exec;
License
MIT