1.1.1 • Published 9 years ago
@f/thunk-to-promise v1.1.1
thunk-to-promise
Convert a thunk to a promise.
Installation
$ npm install @f/thunk-to-promise
Usage
var thunkToPromise = require('@f/thunk-to-promise')
thunkToPromise(function (cb) {
cb(null, 1, 2)
}).then(function (res) {
res // => [1, 2]
})
Api
thunkToPromise(thunk)
thunk
- thunk to convert
Returns: a promise
License
MIT