import { Selector, Predicate } from '../types'; /** * Groups array items based on elementSelector function * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function groupBy(array: any[], groupByFields: string | string[] | Selector): any[]; /** * Returns a distinct elements from array. * Optional parameter *elementSelector* will create new array based on a callback function, * then will eliminate dublicates * @param array * @param elementSelector * @returns */ export declare function distinct(array: any[], elementSelector?: Selector): any[]; /** * Flatten Object or array of objects * Object * [{ a: 1, d:{d1: 22, d2: 33} }, { b: 2, d:{d1:221, d2:331} }] * will become * [{ a: 1, d.d1: 22, d.d2: 33 }, { b: 2, d.d1: 221, d.d2: 331 }] * @param data * @returns */ export declare function unflattenObject(data: any): any; export declare function flattenObject(data: any): any; /** * Flattens array. * @param array The array to flatten recursively. * @example * flatten([1, 4, [2, [5, 5, [9, 7]], 11], 0]); // length 9 */ export declare function flatten(array: any[]): any[]; /** * Returns a reshaped array based on unique column values. * @param array array to pivot * @param rowFields row fields (or index fields). It can be one or more field names * @param columnField a field which values will be used to create columns * @param dataField a dataField which will be aggrated with aggregate function and groupped by rows and columns * @param aggFunction an aggregation function. Default value is sum. data field will be aggregated by this function * @param columnValues an optional initial column values. Use it to define a set of columns/values you would expect */ export declare function pivot(array: any, rowFields: string | string[], columnField: string, dataField: string, aggFunction?: (array: any[]) => any | null, columnValues?: string[]): any[]; /** * Transpose rows to columns in an array * @param data */ export declare function transpose(data: any[]): any[]; /** * Creates new array based on selector. * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function select(data: any[], selector: string | string[] | Selector): any[]; /** * Filters array based on predicate function. * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function where(data: any[], predicate: Predicate): any[]; //# sourceMappingURL=transform.d.ts.map