#promise Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
JavaScript Promise All with Concurrency Limit
Runs an array of async tasks with a maximum concurrency cap, preventing you from firing hundreds of requests simultaneously. Processes items in batches, moving to the next as slots free up. Essential when hitting rate-limited APIs or processing large datasets without overwhelming the server.
TypeScript Promise with Timeout
Race a promise against a timeout — if the work takes longer than `ms`, reject with a timeout error. Cancels nothing on its own (use AbortController for that), but unblocks the caller.
JavaScript Retry Promise with Backoff
Retries a Promise-returning function up to a specified number of times with configurable exponential backoff and optional jitter. Accepts a shouldRetry predicate so you can skip retries on specific error types (e.g. 401 Unauthorized). Returns the resolved value or re-throws the last error after exhausting retries.
TypeScript Deferred / Externally-Resolvable Promise
Create a Promise whose `resolve` and `reject` are exposed externally. Useful when you need to settle a promise from outside its executor — e.g. waiting on an event-driven response.