Promises/A+ 规范的各种实现版本

1,725 阅读3分钟
原文链接: github.com

There are many conformant implementations of Promises/A+. Here are the ones we know about. Note that an implementation’s conformance is determined by it passing the test suite. If you pass the tests, feel free to send a pull request to get yourself on this list!

Conformant implementations are encouraged to include the Promises/A+ logo in their README files with a link to the specification, using code like the following:


    Promises/A+ logo

Also, if your implementation is published in the npm registry, we suggest using the “promises-aplus” keyword.

Standalone

Implementation Description Spec Version
Adehun Light weight Promises/A+ implementation; good for learning about the Promise/A+ spec. 1.1
avow Example Promises/A+ implementation. Simple, tiny, fast, fully async 1.0
ayepromise A teeny-tiny promise library 1.1
bloodhound Feature-rich promise library with performance timing and reporting baked in. 1.1
bluebird Full featured Promises/A+ implementation with exceptionally good performance 1.1
broody-promises Promises with `.value()` method, that brings ability to get value of the chain synchronously 1.1
CodeCatalyst/promise.coffee Promises/A+ compliant implementation in object-oriented CoffeeScript 1.1
Covenant A tight and performant Promises/A+ compliant implementation in CoffeeScript 1.1
creed Functionally-oriented async with coroutines, promises, ES2015 iterables, fantasy-land 1.1
D.js A tiny Promises/A+ implementation for Node.js and the browser with some extras 1.1
Deferred.js Deferreds, promises, and callback aggregators. 1.1
diogocampos/promise-coffee Promises/A+ spec-compliant promises in less than 80 lines of readable CoffeeScript 1.1
fate Promises/A+ closure-based implementation 1.0
ff Simplifies the most common use cases for series, parallel, and promise utilities 1.0
FidPromise Promise implementation that is readable and debuggable 1.1
ipromise Standalone, lightweight and tested implementation of Promises/A+ 1.1
Legendary Combines promise subclassing with sugar inspired by when.js, Q and async. 1.1
Lie Small library following the ES6 syntax 1.1
microPromise Written for a nodejs + browser ArangoDB driver. 1.1
mpromise A Promises/A+ conformant implementation, written for mongoose 1.1
Naive Promesse Naïve implementation of Promises/A+ specification 1.0
Native Promise Only Polyfill for native ES6 Promises only, no extras! 1.1
Octane/Promise Promises/A+ compliant implementation of ES6 promises for browsers and Node.js 1.1
ondras/promise Straightforward client-side Promises/A+ implementation, with XHR, setTimeout etc. 1.1
potch/promise.js Fully Promises/A+ compliant promises and nothing else! 1.0
P A simple Promises/A+ library, implementing a subset of the the Q API 1.1
Pacta An algebraic, Promises/A+ compliant implementation of Promises in node.js. 1.0
Pinky An extremely tiny Promises/A+ implementation that passes the Promises/A+ test suite 1.0
PinkySwear.js Promises/A+ compliant in less than 500 bytes 1.1
promeso A little Promises/A+ implementation 1.0
promiscuous A minimal and fast promise/deferred implementation 1.0
Promises, Promises… A full, documented, standalone Promises/A+ 1.1 implementation for TypeScript / JavaScript / Node.js with some additional features to improve productivity 1.1
Promis A small embeddable Promise polyfill 1.1
Promix Mix promises with callbacks for improved control flow 1.0
Promiz Tiny (590 bytes), with an even smaller micro version at 228 bytes (min + gzip) 1.1
Q A tool for making and composing asynchronous promises in JavaScript 1.0
Robin Egg Bluebird A tiny Promises/A+ compliant implementation inspired by the official Crayola color. 1.1
rsvp.js A lightweight library that provides tools for organizing asynchronous code 1.1
Shvua A promise implementation that also allows you to wrap your object’s API with promise-like API 1.0
Ten.Promise Promises/A+ implementation written in TypeScript 1.0
then/promise Bare bones Promises/A+ implementation 1.1
ThenFail Just another Promises/A+ implementation written in TypeScript 1.1
typescript-deferred A tiny Promises/A+ implementation written in Typescript 1.1
vow Promises/A+ implementation 1.0
Welsh A+ Promises and Deferreds à la Twisted 1.1
when cujoJS’s promise implementation and async toolkit 1.1
yaku A fast, lightweight, error friendly and ES6 compatible implementation (~3.5KB) 1.1
yapa Yet another Promises/A+ implementation 1.0
yapi.js Yet another Promises/A+ implementation which works in both browser and node 1.1
Zousan A lightning fast, very small (

Inside Frameworks

Implementation Description Spec Version
Core A fine foundation for JavaScript projects 1.0
nbd.js Promises as an inheritable trait from nbd.js 1.1
Orion Deferred From the Orion library 1.1
promesse Emily’s Promise/A+ 1.0
YUI YUI is a free, open source JavaScript library for building richly interactive web applications 1.0

In Other Languages

We’ve been excited to discover that the popularity of Promises/A+ has led to a number of implementations in other languages besides JavaScript. Although these don’t necessarily match the exact semantics of the spec due to differing language capabilities, and we can’t verify them against our JavaScript test suite directly, it’s still very exciting to have such a strong community and we want to showcase these efforts.

Language Implementation Description
ActionScript CodeCatalyst/promise-as3 Promises/A+ compliant implementation in ActionScript 3.0
Python xogeny/aplus An implementation of the Promises/A+ specification and test suite in Python
Objective-C RXPromise An Objective-C Class which implements the Promises/A+ specification.
Objective-C SHXPromise A lightweight implementation of Promises/A+ for iOS and OS X.
Perl stevan/promises-perl An implementation of the Promises/A+ pattern for asynchronous programming in Perl.
QML Quick Promise Promises/A+ compliant implementation in QML
C# Real-Serious-Games/c-sharp-promise An unit-tested implementation of the Promises/A+ pattern for asynchronous programming in C#.