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

34 lines (33 loc) 1.24 kB
import { type Ord } from "rambda"; import { sflow, type FlowSource } from "./index"; interface MergeBy { <T>(ordFn: (input: T) => Ord, srcs: FlowSource<FlowSource<T>>): sflow<T>; <T>(ordFn: (input: T) => Ord): { (srcs: FlowSource<FlowSource<T>>): sflow<T>; }; } /** * merge multiple stream by ascend order, assume all input stream is sorted by ascend * output stream will be sorted by ascend too. * * if one of input stream is not sorted by ascend, it will throw an error. * * @param ordFn a function to get the order of input * @param srcs a list of input stream * @returns a new stream that merge all input stream by ascend order * @deprecated use {@link mergeStreamsByAscend} */ export declare const mergeAscends: MergeBy; /** * merge multiple stream by ascend order, assume all input stream is sorted by ascend * output stream will be sorted by ascend too. * * if one of input stream is not sorted by ascend, it will throw an error. * * @param ordFn a function to get the order of input * @param srcs a list of input stream * @returns a new stream that merge all input stream by ascend order * @deprecated use {@link mergeStreamsByAscend} */ export declare const mergeDescends: MergeBy; export {};