import type { JSONPath } from 'immutable-json-patch'; /** * Comparator to sort an array in ascending order * * Usage: * [4,2,5].sort(compareAsc) // [2,4,5] */ export declare function compareAsc(a: T, b: T): number; /** * Comparator to sort an array in ascending order * * Usage: * [4,2,5].sort(compareDesc) // [5,4,2] */ export declare function compareDesc(a: T, b: T): number; /** * Test whether all items of an array are strictly equal */ export declare function strictShallowEqual(a: Array, b: Array): boolean; export declare function compareArrays(a: Array, b: Array): number; /** * Get the paths of all nested properties in the items of an array * @param array * @param includeObjects If true, object and array paths are returned as well */ export declare function getNestedPaths(array: unknown, includeObjects?: boolean): JSONPath[]; /** * Invoke the callback with * @param start Included start index * @param end Excluded end index. End must be larger or equal to start * @param iteratee */ export declare function forEachIndex(start: number, end: number, iteratee: (index: number) => void): void; /** * Limit the number of items in an array */ export declare function limit(array: Array, max: number): Array; /** * Convert an array into an object having the array indices as keys */ export declare function arrayToObject(array: Array): Record; /** * Get the values of an object as an array */ export declare function objectToArray(object: Record): Array; /** * Test whether an array starts with a sub array */ export declare function arrayStartsWith(array: T[], searchArray: T[], equal?: (a: T, b: T) => boolean): boolean; /** * Move a set of items inside an array */ export declare function moveItems(array: T[], index: number, count: number, offset: number): T[]; /** * Take samples out of a large array, equally spread from start till end */ export declare function forEachSample(array: T[], maxSampleCount: number, callback: (item: T, index: number, array: T[]) => void): void; export declare function insertItemsAt(array: T[], index: number, items: T[]): T[];