to-then
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

To Then Travis CI Build Status

Convert any type of promise to a then promise

NPM Badge

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.

Readme

Keywords

Package Sidebar

Install

npm i to-then

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

3.31 kB

Total Files

6

Last publish

Collaborators

  • richienb