promise-a-plus

0.7.0 • Public • Published

promise-a-plus

npm version Build Status Coverage Status Dependency Status devDependency Status npm

Promises/A+ logo

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.

Package Sidebar

Install

npm i promise-a-plus

Weekly Downloads

243

Version

0.7.0

License

MIT

Last publish

Collaborators

  • creeper