MCPcopy Index your code
hub / github.com/nodejs/node / makeAsyncIterable

Function makeAsyncIterable

lib/internal/streams/pipeline.js:79–88  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

77}
78
79function makeAsyncIterable(val) {
80 if (isIterable(val)) {
81 return val;
82 } else if (isReadableNodeStream(val)) {
83 // Legacy streams are not Iterable.
84 return fromReadable(val);
85 }
86 throw new ERR_INVALID_ARG_TYPE(
87 'val', ['Readable', 'Iterable', 'AsyncIterable'], val);
88}
89
90async function* fromReadable(val) {
91 Readable ??= require('internal/streams/readable');

Callers 1

pipelineImplFunction · 0.85

Calls 3

isReadableNodeStreamFunction · 0.85
isIterableFunction · 0.70
fromReadableFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…