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

x/deno/std/util/async.ts

A modern runtime for JavaScript and TypeScript.
Go to Latest
import * as deno from "https://deno.land/x/deno@v0.28.0/std/util/async.ts";

Classes

The MuxAsyncIterator class multiplexes multiple async iterators into a single stream. It currently makes a few assumptions:

  • The iterators do not throw.
  • The final result (the value returned and not yielded from the iterator) does not matter; if there is any, it is discarded.

Functions

Collects all Uint8Arrays from an AsyncIterable and retuns a single Uint8Array with the concatenated contents of all the collected arrays.

Creates a Promise with the reject and resolve functions placed as methods on the promise object itself. It allows you to do: