@f/thunk-to-promise

1.1.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    3
  • 1.1.0
    1

Package Sidebar

Install

npm i @f/thunk-to-promise

Weekly Downloads

4

Version

1.1.1

License

MIT

Last publish

Collaborators

  • f