export declare function isObject(item: any): boolean; export declare function deepEquals(v1: any, v2: any): boolean; export declare function deepCopy(v: any): any; export type ValueOf = T[keyof T]; export declare function objKeys(obj: Record): T[]; export declare function objLength(obj: Record): number; export declare function isObjEmpty(obj: Record): boolean; export declare function objMapEntries, K extends keyof M, O, I = ValueOf>(obj: M, func: (k: K, v: I) => O): [K, O][]; export declare function objMap, K extends keyof M, O, I = ValueOf>(obj: M, func: (k: K, v: I) => O): Record; export declare function objFilter(obj: Record, func: (k: K, v: I) => v is O): Record; export declare function deepFind(obj: I, func: (v: I) => v is O, depth?: number): O | undefined; export declare function promiseObjAll(obj: { [key in K]: Promise; }): Promise>; export declare function pick(obj: T, keys: K[]): Pick; /** * Returns a new object that recursively merges B into A * Where there are conflicts, B takes priority over A * If B has a value for a key that A does not have, B's value is used * If B has a value for a key that A has, and both are objects, the merge recurses into those objects * If B has a value for a key that A has, and both are arrays, the merge concatenates them with B's values taking priority * @param a - The first object * @param b - The second object * @param max_depth - The maximum depth to recurse * @param mergeArrays - If true, arrays will be concatenated instead of replaced */ export declare function objMerge(a: Record, b: Record, max_depth?: number, mergeArrays?: boolean): T; /** * Return a new object with the fields in b removed from a * @param a Base object to remove fields from * @param b The partial object to remove from the base object * @param max_depth The maximum depth to recurse * @param sliceArrays If true, arrays will have values sliced out instead of being removed entirely */ export declare function objOmit = any>(a: Record, b: Record, max_depth?: number, sliceArrays?: boolean): T; export declare function objOmitKeys = any>(obj: Record, keys: string[]): Partial; export declare function invertKeysAndValues(data: any): any; export declare function arrayToObject(keys: Array, val?: boolean): Record; export declare function stringifyObject(object: any, format?: 'json' | 'yaml', space?: number): string; interface ObjectDiffOutput { actual: any; expected: any; } export type ObjectDiff = { [key: string]: ObjectDiffOutput | ObjectDiff; } | ObjectDiff[] | undefined; /** * Merges 2 objects showing any difference in value for common fields. */ export declare function diffObjMerge(actual: Record, expected: Record, maxDepth?: number): { mergedObject: ObjectDiff; isInvalid: boolean; }; export declare function keepOnlyDiffObjects(obj: any): any; export declare function mustGet(obj: Record, key: string): T; export type TransformObjectTransformer = (obj: any, propPath: ReadonlyArray) => any; /** * Recursively applies `formatter` to the provided object * * @param obj * @param transformer a user defined function that takes an object and transforms it. * @param maxDepth the maximum depth that can be reached when going through nested fields of a property * * @throws if `maxDepth` is reached in an object property */ export declare function transformObj(obj: any, transformer: TransformObjectTransformer, maxDepth?: number): any; export declare function sortArraysInObject(obj: any, sortFunction?: (a: any, b: any) => number): any; type JSPrimitiveTypes = string | number | bigint | boolean | undefined | symbol | null; /** * Returns an object where only the keys from `a` that are not in `b` or are different values, are kept */ export declare function objDiff(a: Record, b: Record, areEquals?: (a: TValue, b: TValue) => boolean): Record; export {}; //# sourceMappingURL=objects.d.ts.map