UNPKG

sflow

Version:

sflow is a powerful and highly-extensible library designed for processing and manipulating streams of data effortlessly. Inspired by the functional programming paradigm, it provides a rich set of utilities for transforming streams, including chunking, fil

12 lines (10 loc) 326 B
import { wseFrom } from "./wse"; import { wseMerges } from "./wseMerges"; export const parallels = <SRCS extends ReadableStream<any>[]>(...srcs: SRCS) => wseMerges()(wseFrom(srcs)) as ReadableStream< { [key in keyof SRCS]: SRCS[key] extends ReadableStream<infer T> ? T : never; }[number] >;