A curated list of useful resources for JavaScript Promises
Inspired by the awesome list thing. Not to be confused with other awesome promises like "I promise you a million dollars" or "I promise you'll stay fit and never have to go to the gym again".
Table of Contents
- Resources, Blogs, and Books
- Promises/A+ Implementations (ES6/ES2015 compatible)
- Convenience Utilities
- Promise Cookbook - The why, what, and how. "A brief introduction [...] primarily aimed at frontend developers". ★ 810, pushed 291 days ago
- Promises for Asynchronous Programming - Chapter from Exploring ES6
- You Don't Know JS: Promises - Chapter from You Don't Know JS: Async & Performance
- JavaScript Promises: There and back again - Basics of JavaScript's native promise implementation.
- JavaScript with Promises - from O'Reilly. Short and to-the-point. Uses native and bluebird.
- Promise it won't hurt - An interactive nodeschool workshop ★ 161, pushed 148 days ago
- ES6 Kata Promises - Promises Katas : Basics
- ES6 Promises in Depth
- You're Missing the Point of Promises - Promises are much more than callback aggregation, and that jQuery's implementation (prior to 3.0) isn't enough.
- We have a problem with promises - "Many of us are using promises without really understanding them."
- Promise anti-patterns - Common misuses and how to avoid them.
- Promise anti-patterns (2) - Another set of promises anti-patterns
- Promise Ponderings, (Anti-)Patterns, and Apologies - Promise behaviour demonstrated and explained by common questions and their answers.
- Javascript Promises...In Wicked Detail - Recreate the promise implementation
- Writing Promise-Using Specifications - "This document gives guidance on how to write specifications that create, accept, or manipulate promises"
- Promises/A+ specification
- caniuse promises
- Fates and States - Quick definitions of possible states.
- Promisees - Promise visualization playground for the adventurous.
These implement no more or less than the es6 spec. They make great polyfills and are exceptionally compatible with native promises.
- pinkie - Ponyfill. Node-oriented, but browserifyable . Extremely small implementation. ★ 97, pushed 217 days ago
- native-promise-only - Polyfill. Browser and node-compatible. ★ 454, pushed 163 days ago
- es6-promise - Opt-in polyfill. A strict-spec subset of rsvp.js. ★ 2999, pushed 130 days ago
- lie - Small, browserifyable with an opt-in polyfill. ★ 428, pushed 128 days ago
All of these provide more features than the language yet remain compatible. Node + Browsers for all.
- bluebird - Fully featured, extremely performant. Long stack traces & generator/coroutine support. ★ 10820, pushed 131 days ago
- rsvp.js - Lightweight with a few extras. Compatible down to IE6!
- Q - One of the original implementations. Long stack traces and other goodies. ★ 11547, pushed 145 days ago
-
then/promise
- Small with
nodeify
,denodify
anddone()
additions. ★ 1116, pushed 179 days ago - when.js - Packed with control flow, functional, and utility methods. ★ 2925, pushed 130 days ago
- native-or-bluebird - Helps transition to completely native.
-
pinkie-promise
- Use native, or fall back to
pinkie
. Great for node library authors. ★ 69, pushed 148 days ago - any-promise - Loads the first available implementation. Safe for browserify. ★ 50, pushed 125 days ago
Native and strictly spec-compliant promises are awesome for compatibility, future-proofness, library authors, and browsers. However, libraries like bluebird patch goodies onto the
Promise
constructor and prototype. Solution? tiny modules of course!
- pify - Promisify ("denodify") a callback-style function. ★ 162, pushed 141 days ago
-
promise-each
- Standalone
bluebird.each
. Execute one after the other sequentially. ★ 10, pushed 336 days ago -
promise-filter
- Standalone
bluebird.filter
. Filter an array to a promise. ★ 6, pushed 422 days ago -
promise-finally
- Standalone bluebird
finally()
. Execute a handler unconditionally after others have been handled. ★ 2, pushed 215 days ago -
promise-map
- Standalone
bluebird.map
. Map an array to a promise. ★ 7, pushed 422 days ago -
promise-method
- Standalone
bluebird.method
. Turn a synchronously-returning method into a promise-returning one. ★ 1, pushed 352 days ago -
promise-props
- Standalone implementation of bluebird's
bluebird.props
or rsvp'sRSVP.hash
★ 3, pushed 463 days ago -
promise-reduce
- Standalone
bluebird.reduce
. Reduce an array to a promise. ★ 6, pushed 412 days ago -
promise-some
- Standalone
bluebird.some
. Check if an element passes the predicate, return a promise. ★ 4, pushed 422 days ago -
promise-try
- Standalone
bluebird.try
. Execute a synchronously-returning function and return a promise. ★ 2, pushed 352 days ago - is-promise - Determine if something looks like a Promise. ★ 22, pushed 256 days ago
- sprom - Resolve when a stream ends. Optional buffering (be careful with this!) ★ 10, pushed 256 days ago
-
task.js
- Write async functions in a blocking style using promises and generators. Like
bluebird.coroutine
. ★ 1492, pushed 1012 days ago -
co
- Like
task.js
andbluebird.coroutine
, but supports thunks too. ★ 5252, pushed 130 days ago - lie-fs - Promise wrappers for Node's FS API.
-
immediate-promise
- Returns a promise resolved in the next event loop - think
setImmediate()
. ★ 37, pushed 151 days ago - delay - Delay a promise a specified amount of time. ★ 82, pushed 249 days ago
- promise-whilst - Calls a function repeatedly if and while a condition returns true and then resolves the promise. ★ 15, pushed 151 days ago
- loud-rejection - Make unhandled promise rejections fail loudly instead of the default silent fail. ★ 89, pushed 150 days ago
- promise-until - Calls a function repeatedly if a condition returns false and until the condition returns true and then resolves the promise. ★ 0, pushed 284 days ago
- promise-do-until - Calls a function repeatedly until a condition returns true and then resolves the promise. ★ 0, pushed 284 days ago
- promise-do-whilst - Calls a function repeatedly while a condition returns true and then resolves the promise. ★ 0, pushed 284 days ago
- promise-semaphore - Push a set of work to be done in a configurable serial fashion ★ 22, pushed 197 days ago
Licensed under the Creative Commons CC0 License .