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

9 lines (8 loc) 181 B
export function skips<T>(n = 1) { return new TransformStream<T, T>({ transform: async (chunk, ctrl) => { if (n <= 0) ctrl.enqueue(chunk); else n--; }, }); }