wrapSync
Take a sync function and make it async, passing its return value to a callback. Based on async#asyncify as module.
Install
npm install wrapsync --save
If you want to use in the browser (powered by Browserify):
bower install wrapsync --save
and later link in your HTML:
Usage
var wrapSync = ; var parse = ; ;
API
wrapSync(fn)
Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback
Arguments
fn
- a sync function.
License
MIT © Kiko Beats