wrap a synchronous function in an async one
wrap an synchronous function in an async one
$ npm install desync $ component install nathan7/desync
returns a function that takes one more argument - a callback with signature function(err, result). The callback is guaranteed to be called asynchronously. desync will pass the return value of fn as the result. desync will catch thrown exceptions and pass them to the callback.