UNPKG

@thi.ng/transducers

Version:

Collection of ~170 lightweight, composable transducers, reducers, generators, iterators for functional data transformations

18 lines 568 B
import type { Transducer } from "./api.js"; /** * Transducer which accepts iterables as value and joins each into a string * using given separator. * * @example * ```ts tangle:../export/join.ts * import { join } from "@thi.ng/transducers"; * * console.log([...join("/", [[1, 2, 3], [4, 5]])]); * // [ '1/2/3', '4/5' ] * ``` * * @param sep */ export declare function join(sep?: string): Transducer<Iterable<any>, string>; export declare function join(sep: string, src?: Iterable<Iterable<any>>): IterableIterator<string>; //# sourceMappingURL=join.d.ts.map