1.0.1 • Published 7 years ago
thunk-to-promise v1.0.1
thunk-to-promise
Converts a Thunk to a Promise. (Picked from co)
Get it: npm install --save thunk-to-promise
Sample usage:
var readThunk = require("thunkify")(fs.read);
var thunkToPromise = require("thunk-to-promise");
var readPromise = thunkToPromise(readThunk);
// readPromisse is your thunk, that got converted to a Promise.