Skip to main content
Deno 2 is finally here 🎉️
Learn more

promise_fns

Promise utility functions for Deno.

semantic-release

Inspired by the sindresorhus promise-fun collection. Parity with the node promise-fun library is not guaranteed.

Features:

  • each function is independently importable
  • all APIs are type-safe first

usage

functions

function description links
all resolve an eager or lazy collection of promises src test
delay create a promise that sleeps for some milliseconds then resolves src test
delayReject create a promise that sleeps for some milliseconds then rejects src test
map maps a collection into a new collection asynchronously src test
promisify converts a node-style callback function into a promisified function, returning the result after err, per (err, result) => void src test
promisify-multi converts a node-style callback function into a promisified function, returning all results after err, per (err, ...results) => void src test
props maps a { key:promise } mapped collection to a { key:resolved-promise } mapped collection src test
queue creates a queue that allows users to add work. queue resolves when no work is outstanding src test