1.0.0 • Published 4 years ago
to-then v1.0.0
To Then
Convert any type of promise to a then promise
Install
npm install to-then promise
Usage
const toThen = require("to-then");
const es6Promise = new Promise(resolve => resolve("Hello World!")); // Regular native promise.
const thenPromise = toThen(es6Promise); // Then promise.
API
toThen(promise)
promise
Type: PromiseLike
The promise to convert.
1.0.0
4 years ago