MCPcopy Create free account
hub / github.com/WinterTC55/iter-streams / applyStatelessSyncTransform

Function applyStatelessSyncTransform

src/pull.js:504–525  ·  view source on GitHub ↗

* Apply a single stateless sync transform to a source.

(source, transform)

Source from the content-addressed store, hash-verified

502 * Apply a single stateless sync transform to a source.
503 */
504function applyStatelessSyncTransform(source, transform) {
505 var _i, source_1, chunks, result;
506 return __generator(this, function (_a) {
507 switch (_a.label) {
508 case 0:
509 _i = 0, source_1 = source;
510 _a.label = 1;
511 case 1:
512 if (!(_i < source_1.length)) return [3 /*break*/, 4];
513 chunks = source_1[_i];
514 result = transform(chunks);
515 return [5 /*yield**/, __values(processTransformResultSync(result))];
516 case 2:
517 _a.sent();
518 _a.label = 3;
519 case 3:
520 _i++;
521 return [3 /*break*/, 1];
522 case 4: return [2 /*return*/];
523 }
524 });
525}
526/**
527 * Apply a single stateful sync transform to a source.
528 */

Callers 1

createSyncPipelineFunction · 0.70

Calls 2

transformFunction · 0.70

Tested by

no test coverage detected