0.4.0 • Published 4 years ago

promise.ify v0.4.0

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

promise.ify

promiseify / promisify / promise-ify / pify

Build Status Coverage Status npm version npm downloads npm license

Note

this is target ES5 environment.

Install

$ npm i promise.ify --save

API

promiseify

  • promiseify(m, ctx)
    • m: the input
    • ctx: the context
  • promiseify.all(o)
    • o: the input object
var promiseify = require('promise.ify')
var readFile = promiseify(fs.readFile, fs)

var Connection = require('mysql/lib/Connection')
promiseify.all(Connection.prototype)

promiseify.noerr

take care of the callback(result) case

  • promiseify.noerr(m, ctx)
    • m: the input method
    • ctx: the context
  • promiseify.noerr.all(o)
    • o: the input object

Why

for split things out of bluebird

Changelog

CHANGELOG.md

See Also

License

the MIT License http://magicdawn.mit-license.org