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

Function canUseSyncIterablePipeToFastPath

lib/internal/streams/iter/pull.js:132–146  ·  view source on GitHub ↗
(source, transforms, signal)

Source from the content-addressed store, hash-verified

130}
131
132function canUseSyncIterablePipeToFastPath(source, transforms, signal) {
133 if (signal !== undefined ||
134 transforms.length !== 0 ||
135 isPrimitiveChunk(source) ||
136 ArrayIsArray(source) ||
137 source?.[kValidatedSource] ||
138 !isSyncIterable(source) ||
139 isAsyncIterable(source)) {
140 return false;
141 }
142
143 // Preserve from()'s top-level protocol precedence for custom iterables.
144 return typeof source[toAsyncStreamable] !== 'function' &&
145 typeof source[toStreamable] !== 'function';
146}
147
148// =============================================================================
149// Transform Output Flattening

Callers 1

pipeToFunction · 0.85

Calls 3

isPrimitiveChunkFunction · 0.85
isSyncIterableFunction · 0.70
isAsyncIterableFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…