-
Notifications
You must be signed in to change notification settings - Fork 395
Cookbook
Brian Cavalier edited this page Jul 21, 2014
·
3 revisions
This is a evolving collection of recipes, patterns, and idioms for solving problems with promises.
Promises are incredibly flexible building blocks for composing asynchronous operations. They can be used in a variety of ways to solve a variety of problems, and no promise library could provide a convenience API for every situation.
This cookbook is intended to serve as inspiration and to provide jumping-off points that help you compose solutions for your specific situations.
- First fulfilled promise by array order, ie with the smallest index.
- [[Control concurrency with
map
andguard
]] - Return a default value for a promise that times out