Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
promise-fun
Promise packages, patterns, chat, and tutorials
https://github.com/sindresorhus/promise-fun
Last synced: 10 minutes ago
JSON representation
-
Packages
-
- pify - style function
- delay
- yoctodelay
- p-all - returning & async functions concurrently with optional limited concurrency
- p-event
- p-debounce - returning & async functions
- p-throttle - returning & async functions
- p-timeout
- p-retry - returning or async function
- p-any
- p-some
- p-mutex
- p-locate
- p-limit - returning & async functions with limited concurrency
- p-series - returning & async functions in series
- p-memoize - returning & async functions
- p-pipe - returning & async functions into a reusable pipeline
- p-props
- p-waterfall - returning & async functions in series, each passing its result to the next
- p-cancelable
- p-progress
- p-reflect
- p-filter
- p-reduce
- p-settle
- p-map-series
- p-each-series
- p-times - returning & async functions a specific number of times concurrently
- p-lazy
- p-whilst
- p-do-whilst
- p-forever - returning & async functions repeatedly until you end it
- p-wait-for
- p-min-delay
- p-try - Starts a promise chain
- p-race
- p-immediate - think `setImmediate()`
- p-time
- p-defer
- p-is-promise
- p-state
- p-queue
- make-synchronous
-
`.then`/`.catch`-based packages
-
-
FAQ
-
How can I run 100 async/promise-returning functions with only 5 running at once?
- `p-map` - they are eager. So by the time `p-map` starts reading the array, all the actions creating those promises have already started running. `p-map` works by executing a promise-returning function in a mapper function. This way the promises are created lazily and can be concurrency limited. Check out [`p-all`](https://github.com/sindresorhus/p-all) instead if you're using different functions to get each promise.
-
Programming Languages
Categories
Sub Categories