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

Function pullSync

lib/internal/streams/iter/pull.js:874–888  ·  view source on GitHub ↗

* Create a sync pull-through pipeline with transforms. * @param {Iterable} source - The sync streamable source * @param {...Function} transforms - Variadic transforms * @returns {Iterable }

(source, ...transforms)

Source from the content-addressed store, hash-verified

872 * @returns {Iterable<Uint8Array[]>}
873 */
874function pullSync(source, ...transforms) {
875 for (let i = 0; i < transforms.length; i++) {
876 if (!isTransform(transforms[i])) {
877 throw new ERR_INVALID_ARG_TYPE(
878 `transforms[${i}]`, ['Function', 'Object with transform()'],
879 transforms[i]);
880 }
881 }
882 return {
883 __proto__: null,
884 *[SymbolIterator]() {
885 yield* createSyncPipeline(fromSync(source), transforms);
886 },
887 };
888}
889
890/**
891 * Create an async pull-through pipeline with transforms.

Calls 1

isTransformFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…