0.0.3 • Published 7 years ago

then-ify v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

then-ify

Make your synchronous function thenable.

NPM version Build status License

Install

$ npm install then-ify --save

Example

var thenify = require('then-ify');

// Here we have a synchronous function
function syncFunction(input) { return input * input; }

// Now you can call .then with then-ify
thenify(syncFunction)(3)
  .then(function(output){
    // output = 9
  });