{ } qjs-modules

extendAsyncGenerator

Source: lib/extendAsyncGenerator.js (pure JS) — default export: extendAsyncGenerator

Installs extra methods onto the async-generator prototype.

Exports

ExportArgsKindDescription
extendAsyncGenerator(proto=AsyncGeneratorPrototype)0–1functionInstalls the extensions. (default export)
AsyncGeneratorExtensions—constThe bag of methods that get installed.
AsyncGeneratorPrototype, AsyncGenerator—constThe async-generator prototype and its constructor.

Added async-generator methods

MethodDescription
includes(value)Whether the async stream yields value.
enumerate()Yields [index, value] pairs.