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

22 lines 716 B
import type { Awaitable } from "./Awaitable"; /** * 1. cache whole list once upstream flushed * 2. Replace the stream with cached list if exist * * Set ttl in your store settings * * This step should place at near the output end. * @deprecated use cacheSkips to reduce cache size */ export declare function cacheLists<T>(store: { has?: (key: string) => Awaitable<boolean>; get: (key: string) => Awaitable<T[] | undefined>; set: (key: string, chunks: T[]) => Awaitable<void>; }, _options?: string | { /** * Key could step name, * or defaults to `new Error().stack` if you r lazy enough */ key?: string; }): TransformStream<any, any>; //# sourceMappingURL=cacheLists.d.ts.map