Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
wrap a synchronous function in an async one
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.jshintrc
.travis.yml
Readme.md
component.json
desync.js
package.json
test.js

Readme.md

Build Status

desync

wrap an synchronous function in an async one

Installation

$ npm install desync

$ component install nathan7/desync

desync(fn)

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.

License

MIT

Something went wrong with that request. Please try again.