README
Convert the promise to use another promise provider.
Install
npm install convert-promise
Usage
const convertPromise = require("convert-promise");
const BBPromise = require("bluebird");
const es6Promise = new Promise(resolve => resolve("Hello World!")); // Regular native promise.
const bluebirdPromise = convertPromise(es6Promise, BBPromise); // Bluebird promise.
API
convertPromise(promise, newPromiseProvider)
promise
Type: PromiseLike
The promise to convert.
newPromiseProvider
Type: PromiseContructorLike
Default: Promise
The new promise provider object.