UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

5 lines (4 loc) 409 B
type ReduceKvReducer<TAccumulator, TValue> = (accumulator: TAccumulator, key: string | number, value: TValue) => TAccumulator; type ReduceKvCollection<TValue> = Record<string, TValue> | TValue[]; export declare function reduce_kv<TAccumulator, TValue = unknown>(reducer: ReduceKvReducer<TAccumulator, TValue>, initial: TAccumulator, collection: ReduceKvCollection<TValue> | unknown): TAccumulator; export {};