0.1.1 • Published 7 years ago

@whinc/es6-promise v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 years ago

es6-promise

An implementation of ES6 Promise follow strictly Promise/A+ specification.

How to use

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());
});

Others

Gihubu: https://github.com/whinc/es6-promise

npm: https://www.npmjs.com/package/@whinc/es6-promise