promise-a-plus

A JavaScript Promise/A+ Library.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
promise-a-plus
810.7.07 years ago9 years agoMinified + gzip package size for promise-a-plus in KB

Readme

promise-a-plus
npm version Build Status Coverage Status Dependency Status devDependency Status npm
<img src="https://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo" title="Promises/A+ 1.0 compliant" align="right" />

This is a JavaScript implementation of Promises/A+ spec, and adequately tested.
Also a full featured polyfill for ES6 Promise.

Install

NPM

Usage

var Promise = require('promise-a-plus');

var promise1 = Promise.resolve('nice');
var promise2 = new Promise(function(resolve, reject) {
   reject('just rejected');
});
Promise.race([promise1, promise2]).then(console.log.bind(console));

If you want to use in browser, use tools like webpack or browserify.

API

The library's API is absolutely consistent with official API.
Also view wiki.

License

Copyright (c) 2015 creeperyang. Licensed under the MIT license.