import { Maybe, Nullable } from "./Maybe"; export declare function isIterable(obj: unknown): obj is Iterable; export declare function ifArray(arr: T[] | unknown): Maybe; export declare function toArray(arr: undefined | null | T[] | T | Iterable): T[]; export declare function compact(array: Nullable[]): T[]; /** * Remove all elements from the given array that return false from the given * predicate `filter`. */ export declare function filterInPlace(arr: T[], filter: (t: T) => boolean): T[]; export declare function uniq(arr: T[]): T[]; export declare function shallowArrayEql(a: unknown[], b: unknown[]): boolean; type Comparable = number | string | boolean; /** * Returns a copy of arr, stable sorted by the given constraint. Note that false * < true, and that `f` may return an array for sort priorities, or undefined if * the item should be skipped from the returned result. * * Note: localeSort() thinks lower case should come before upper case (!!) */ export declare function sortBy(arr: Iterable> | Maybe[], f: (t: T) => Maybe): T[]; export declare function leastBy(haystack: T[], f: (t: T) => Maybe): Maybe; export {};