mypromises6
v0.0.1
Published
A Promises/A+ implementation using ES6 features
Downloads
7
Readme
mypromises6
A Promises/A+ implementation using ES6 features.
Installation
$ npm install mypromises6
Usage
var Promise = require('mypromises6');
var promise = new Promise();
get('http://www.google.com', function (err, res) {
if (err) promise.reject(err);
else promise.resolve(res);
});
promise.then(
console.log.bind(console, 'fulfilled:'),
console.log.bind(console, 'rejected:')
);