Attaches to an external promise library and provides additional methods built solely on the basic promise operations:

  • construct a new promise with a callback function
  • resolve a promise with some result data
  • reject a promise with a reason

usage

For any third-party promise library:

const promise = require('bluebird');
const spex = require('spex')(promise);

For ES6 promises:

const spex = require('spex')(Promise);
Author:
  • Vitaly Tomilov
Source:
See: