MCPcopy
hub / github.com/nodejs/undici / wrapWithAsyncIterable

Function wrapWithAsyncIterable

test/utils/async-iterators.js:3–10  ·  view source on GitHub ↗
(asyncIterable, indefinite = false)

Source from the content-addressed store, hash-verified

1'use strict'
2
3async function * wrapWithAsyncIterable (asyncIterable, indefinite = false) {
4 for await (const chunk of asyncIterable) {
5 yield chunk
6 }
7 if (indefinite) {
8 await new Promise(() => {})
9 }
10}
11
12const STREAM = 'stream'
13const ASYNC_ITERATOR = 'async-iterator'

Callers 8

client.jsFile · 0.85
promises.jsFile · 0.85
get-head-body.jsFile · 0.85
maybeWrapStreamFunction · 0.85
client-errors.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…