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

11 lines (9 loc) 380 B
import { throughs } from "./throughs"; /* terminate the stream when signal is aborted. */ export function terminates<T>(signal: AbortSignal) { return throughs((r) => r.pipeThrough(new TransformStream(), { signal })); } /** @deprecated use terminates */ export function aborts(signal: AbortSignal) { return throughs((r) => r.pipeThrough(new TransformStream(), { signal })); }