* Create a sync pull-through pipeline with transforms. * @param {Iterable} source - The sync streamable source * @param {...Function} transforms - Variadic transforms * @returns {Iterable }
(source, ...transforms)
| 872 | * @returns {Iterable<Uint8Array[]>} |
| 873 | */ |
| 874 | function 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. |
no test coverage detected
searching dependent graphs…