An implementation of ES6 Promise follow strictly Promise/A+ specification.
Install package with command below:
$ npm install --save @whinc/es6-promise
Example:
let ES6Promise = require('@whinc/es6-promise').ES6Promise;
ES6Promise.resolve(3).then((data) => {
console.log(data);
});
new ES6Promise((resolve, reject) => {
setTimeout(() => {
console.log(new Date());
resolve(1000);
}, 1000);
}).then(() => {
console.log(new Date());
});