extendAsyncGenerator
Source: lib/extendAsyncGenerator.js (pure JS) — default export: extendAsyncGenerator
Installs extra methods onto the async-generator prototype.
Exports
| Export | Args | Kind | Description |
|---|---|---|---|
extendAsyncGenerator(proto=AsyncGeneratorPrototype) | 0–1 | function | Installs the extensions. (default export) |
AsyncGeneratorExtensions | — | const | The bag of methods that get installed. |
AsyncGeneratorPrototype, AsyncGenerator | — | const | The async-generator prototype and its constructor. |
Added async-generator methods
| Method | Description |
|---|---|
includes(value) | Whether the async stream yields value. |
enumerate() | Yields [index, value] pairs. |
Export list
Generated by utilities/doc-api.js from the extendAsyncGenerator dump of utilities/api-surface.sh: 11 members. Edit the text above this block, not the block.
Functions: AsyncGenerator[Symbol.toStringTag](), default(), extendAsyncGenerator()
AsyncGenerator
class
- properties:
AsyncGeneratorExtensions
object
- static methods:
chain(),chainAll(),enumerate(),includes(),range()