@f/thunk-to-promise

Convert a thunk to a promise.

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/thunk-to-promise
001.1.16 years ago6 years agoMinified + gzip package size for @f/thunk-to-promise in KB

Readme

thunk-to-promise

Build status Git tag NPM version Code style

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.