0.0.3 • Published 7 years ago
then-ify v0.0.3
then-ify
Make your synchronous function thenable.
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
});