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

Function applyStatefulSyncTransform

lib/internal/streams/iter/pull.js:509–520  ·  view source on GitHub ↗
(source, transform)

Source from the content-addressed store, hash-verified

507}
508
509function* applyStatefulSyncTransform(source, transform) {
510 const output = transform(withFlushSync(source));
511 for (const item of output) {
512 const batch = [];
513 for (const chunk of flattenTransformYieldSync(item)) {
514 ArrayPrototypePush(batch, chunk);
515 }
516 if (batch.length > 0) {
517 yield batch;
518 }
519 }
520}
521
522/**
523 * Create a sync pipeline from source through transforms.

Callers 1

createSyncPipelineFunction · 0.85

Calls 3

withFlushSyncFunction · 0.85
transformFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…