Utility to convert a sync function to async.
$ npm install func-to-async --save
var toAsync = require('func-to-async');
var asyncFunc = toAsync(syncFunc);
asyncFunc(function(err) {
if(err) {
return console.error(err);
}
});
view tests for more examples.
fn
Type: Function
The Sync function to convert to async
ctx
Type: Object
optional
context to bind the function to.
MIT