1.1.1 • Published 9 years ago

@f/thunk-to-promise v1.1.1

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

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