Project Awesome project awesome

JavaScript > Promises

Collection 1.7k stars GitHub

Convenience Utilities

delay 627 updated 4mo ago

Delay a promise a specified amount of time.

pify 1.5k updated 3y ago

Promisify ("denodify") a callback-style function.

loud-rejection 282 updated 5y ago

Make unhandled promise rejections fail loudly instead of the default silent fail.

hard-rejection 107 updated 3y ago

Make unhandled promise rejections fail hard right away instead of the default silent fail

p-queue 4.2k updated 25d ago

Promise queue with concurrency control

p-break 24 updated 5y ago

Break out of a promise chain

p-lazy 285 updated 1y ago

Create a lazy promise that defers execution until ".then()" or ".catch()" is called

p-defer 85 updated 6mo ago

Create a deferred promise

p-if 63 updated 5y ago

Conditional promise chains

p-tap 134 updated 5y ago

Tap into a promise chain without affecting its value or state

p-map 1.5k updated 3d ago

Map over promises concurrently

p-all 345 updated 6mo ago

Run promise-returning & async functions concurrently with optional limited concurrency

p-limit 2.8k updated 1mo ago

Run multiple promise-returning & async functions with limited concurrency

p-times 42 updated 4y ago

Run promise-returning & async functions a specific number of times concurrently

p-catch-if 40 updated 5y ago

Conditional promise catch handler

p-time 72 updated 2y ago

Measure the time a promise takes to resolve

p-log 29 updated 5y ago

Log the value/error of a promise

p-filter 81 updated 3d ago

Filter promises concurrently

p-settle 94 updated 6mo ago

Settle promises concurrently and get their fulfillment value or rejection reason

p-memoize 439 updated 5mo ago

Memoize promise-returning & async functions

p-whilst 58 updated 1y ago

Calls a function repeatedly while a condition returns true and then resolves the promise

p-throttle 515 updated 4mo ago

Throttle promise-returning & async functions

p-debounce 233 updated 4mo ago

Debounce promise-returning & async functions

p-retry 1.0k updated 3mo ago

Retry a promise-returning or async function

p-wait-for 167 updated 6mo ago

Wait for a condition to be true

p-timeout 300 updated 5mo ago

Timeout a promise after a specified amount of time

p-race 51 updated 3y ago

A better Promise.race()

p-try 60 updated 6mo ago

Promise#try() ponyfill - Starts a promise chain

p-finally 47 (archived)

Promise#finally() ponyfill - Invoked when the promise is settled regardless of outcome

p-any 56 updated 3y ago

Wait for any promise to be fulfilled

p-some 39 updated 6mo ago

Wait for a specified number of promises to be fulfilled

p-pipe 127 updated 5y ago

Compose promise-returning & async functions into a reusable pipeline

p-each-series 52 updated 3y ago

Iterate over promises serially

p-map-series 51 updated 5y ago

Map over promises serially

p-reduce 74 updated 3y ago

Reduce a list of values using promises into a promise for a value

p-props 201 updated 6mo ago

Like Promise.all() but for Map and Object