promise.ify
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i promise.ify

    Weekly Downloads

    21

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    6.79 kB

    Total Files

    6

    Last publish

    Collaborators

    • magicdawn