UNPKG

@socketsecurity/lib

Version:

Core utilities and infrastructure for Socket.dev security tools

21 lines (20 loc) 986 B
/** * @fileoverview Stream processing utilities with streaming-iterables integration. * Provides async stream handling and transformation functions. */ import type { IterationOptions } from './promises'; /** * Execute a function for each item in an iterable in parallel. */ /*@__NO_SIDE_EFFECTS__*/ export declare function parallelEach<T>(iterable: Iterable<T> | AsyncIterable<T>, func: (item: T) => Promise<unknown>, options?: number | IterationOptions): Promise<void>; /** * Map over an iterable in parallel with concurrency control. */ /*@__NO_SIDE_EFFECTS__*/ export declare function parallelMap<T, U>(iterable: Iterable<T> | AsyncIterable<T>, func: (item: T) => Promise<U>, options?: number | IterationOptions): AsyncIterable<U>; /** * Transform an iterable with a function. */ /*@__NO_SIDE_EFFECTS__*/ export declare function transform<T, U>(iterable: Iterable<T> | AsyncIterable<T>, func: (item: T) => Promise<U>, options?: number | IterationOptions): AsyncIterable<U>;