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

14 lines (13 loc) 309 B
import { sflow } from "./sflow"; it("works", async () => { expect( await sflow([{ a: 1, b: [1, 2, 3], c: [1, 2, 3] }]) .unwind("b") .map((e) => e) .toArray(), ).toEqual([ { a: 1, b: 1, c: [1, 2, 3] }, { a: 1, b: 2, c: [1, 2, 3] }, { a: 1, b: 3, c: [1, 2, 3] }, ]); });