JSPM

promise-resolver

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q54554F
  • License MIT

Turn a promises resolver methods into a node style callback

Package Exports

  • promise-resolver

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 (promise-resolver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

promise-resolver Build Status

Turn a promises resolver methods into a node style callback

Install

$ npm install --save promise-resolver

Usage

var promiseResolver = require('promise-resolver');

new Promise(function (resolve, reject) {
  var cb = promiseResolver(resolve, reject);
  
  cb(new Error('...')); // rejects promise
  cb(null, 'result'); // resolves promise
});

Note: You may not need this. Make sure you understand your promise libraries "promisify" methods first.

License

MIT © James Talmage