@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

Readme

Keywords

none

Package Sidebar

Install

npm i @f/thunk-to-promise

Weekly Downloads

2

Version

1.1.1

License

MIT

Last publish

Collaborators

  • f