1.0.0 • Published 10 years ago

@micro-js/thunk-to-promise v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 years ago

thunk-to-promise

Build status Git tag NPM version Code style

Convert a thunk to a promise.

Installation

$ npm install @micro-js/thunk-to-promise

Usage

var thunkToPromise = require('@micro-js/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

1.0.0

10 years ago

0.1.6

10 years ago