/** * Recursively deep clone a value. Handles primitives, arrays, plain objects, Date, RegExp, Set, Map, and typed arrays. * Non-cloneable values (functions, WeakMap, WeakSet, etc.) are copied by reference. */ export declare function cloneDeep(obj: T): T; /** * Remove duplicate elements from an array based on a key function or property name. */ export declare function uniqBy(arr: T[], key: ((item: T) => unknown) | string): T[]; /** * Sort an array by a key function. Returns a new sorted array (does not mutate the original). */ export declare function sortBy(arr: T[], keyFn: (item: T) => string | number | boolean | null | undefined): T[]; /** * Check if two sets are equals (they contain the same elements). Will not work if the content can't be compared by `==`. */ export declare function setEquals(setA: Set, setB: Set): boolean; /** * Check if two arrays are equals (they contain the same elements). */ export declare function arrayEquals(arrayA: T[], arrayB: T[]): boolean; /** * Check if two elements are equals (they contain the same elements). */ export declare function anyEquals(anyA: any, anyB: any): boolean; /** * Check if two objects are equals (by comparing the properties in a deep way). * @param objectA * @param objectB * @param ignoredProperties */ export declare function objectEquals(objectA: T, objectB: T, ignoredProperties?: string[]): boolean; /** * Fully consumes an async generator and provides all results as an array. * @param generator an async generator. */ export declare function asyncGeneratorToArray(generator: AsyncGenerator): Promise;