JSPM

standard-as-callback

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6759457
  • Score
    100M100P100Q218436F
  • License MIT

A performant and standard (Bluebird) library that registers a node-style callback on a promise

Package Exports

  • standard-as-callback

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (standard-as-callback) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Standard asCallback

A performant and standard (Bluebird) library that registers a node-style callback on a promise.

Build Status

Install

$ npm install standard-as-callback

Usage

const asCallback = require('standard-as-callback')

const promise = new Promise(function (resolve) {
  setTimeout(function () {
    resolve('hello world!')
  }, 1000)
})

asCallback(promise, function callback (err, res) {
  console.log(err, res) // null, 'hello world!'
})

Thanks

Most code of this library are ported from the awesome Bluebird library.

License

The MIT License.