UNPKG

@rdkmaster/jigsaw-labs

Version:

Jigsaw, the next generation component set for RDK

16 lines (15 loc) 813 B
export declare function getColumn(matrix: any[][], column: number): any[]; export declare function getRow(matrix: any[][], row: number): any[]; export declare function distinct(list: any[]): any[]; export declare type Grouped = { _$groupItems: any[]; [group: string]: any[][]; }; export declare function group(matrix: any[][], groupBy: number): Grouped; export declare function flat(group: Grouped): string[][]; export declare type ReduceFunction = (previousValue?: number, currentValue?: number, currentIndex?: number, array?: number[]) => number; export declare type AggregateAlgorithm = 'sum' | 'average' | 'max' | 'min' | 'head' | 'tail' | ReduceFunction; export declare function aggregate(matrix: string[][], by: { index: number; algorithm: AggregateAlgorithm; }[]): string[];