Introduction
An implementation of Promises/A+ using ES6, and Chinese specification of Promises/A+.
Install
npm i a-promise-lib
Usage
let Promise = let promise = { } ;async { const ret = await promise console}
API
This library has achieved all the APIs same as JavaScript Standard built-in Promise, including static methods:
Promise.resolve
Promise.reject
Promise.all
Promise.race
and prototype methods:
Promise.prototype.then
Promise.prototype.catch
Promise.prototype.finally
and others:
Promise.deferred
Promise.prototype.done
Compliances Test
Refer to Promises/A+ Compliance Test Suite.
npm run test
will see the result like this:
872 passing
License
The MIT License (MIT)