UNPKG

@future-widget-lab/record-set

Version:

A dedicated data structure for in-memory record collections, offering fluent, immutable APIs for MongoDB-like querying, sorting, and transformation.

13 lines (12 loc) 431 B
type GroupByOptions<TRecord, TKey> = { keyExtractor: (record: TRecord) => TKey; records: Array<TRecord>; }; /** * @description * Use helper to group records by a key derived from each record. * * It returns a `Map` where keys are group keys and values are record sets of grouped records. */ export declare const groupBy: <TRecord, TKey>(options: GroupByOptions<TRecord, TKey>) => Map<TKey, Array<TRecord>>; export {};