import { JsonType, PlainObjectType } from '../types/generic.types'; /** * Checks if an object is an object. * * @param {any} maybeObject - The object to check * @returns {boolean} True if the object is an object */ export declare function isObject(maybeObject: unknown): maybeObject is object; /** * Checks if an object is a plain object {}, similar to jQuery.isPlainObject() * * @param {object} maybePlainObject - The object to check * @returns {boolean} True if the object is plain */ export declare function isPlainObject(maybePlainObject: unknown): maybePlainObject is PlainObjectType; /** * Type guard to determine if an object has a `toJSON()` method * @param obj - The object to check * @returns boolean */ export declare function hasToJSON(obj: unknown): obj is { toJSON: () => string; }; /** * * @param maybeJSON - The object to check * @returns boolean */ export declare function isJSONSerializable(maybeJSON: unknown): maybeJSON is JsonType; /** * Method for extending plainObjects/options, similar to Object.assign() but with deep/recursive merging. If the recursive setting is applied it will merge any plain object children. Note that Arrays are treated as data and not as tree structure when merging. * * The original options passed are left untouched. * * @param {Object} target - Original options. * @param {Object} properties - Merged options that will replace options from the target. * @param {boolean} [recursive=false] True will merge any sub-objects of the options recursively. Otherwise sub-objects are treated as data. * @returns {Object} A new object containing the merged options. */ export declare function assign(target: TTarget, properties: TTarget, recursive?: boolean): TTarget; /** * Always returns an Array. * * @example * asArray(1); // [1] * asArray([1]); // [1] * * @param {unknown} maybeArray * @returns Array */ export declare function asArray(maybeArray: unknown): TArrayItems[]; /** * Async version of Array.find() * * @param array The array to search in * @param predicate The predicate for the search * @returns Any found item. */ export declare function findAsyncSequential(array: T[], predicate: (t: T) => Promise): Promise; /** * Case insensitive string comparison * * @param {any} str1 - The first string to compare * @param {any} str2 - The second string to compare * @param {boolean} ignoreType - Skip type check and use any stringified value * @returns {boolean} */ export declare function eqString(str1: unknown, str2: unknown, ignoreType?: boolean): boolean; /** * Compares two plain objects. Compares all the properties in a to any properties in b. * * @param {any} a - The plain object to compare with b * @param {any} b - The plain object to compare properties from a to * @param {boolean} skipLength - Do not compare the number of properties * @param {boolean} anyObject - Compare anything as objects * @returns {boolean} */ export declare function eqObjects(a: PlainObjectType, b: PlainObjectType, skipLength?: boolean, anyObject?: boolean): boolean; /** * Shifts the values and property keys. * * @param {any} obj - The plain object to reverse keys and values from * @returns {Object} - A new object with reversed properties. */ export declare function reversedProperties>(obj: T): { [k: string]: keyof T; }; /** * Includes reversed keys and values in an object. * @param {any} obj - The plain object to reverse keys and values from. * @returns {Object} - A new object with the original properties together with reversed properties. */ export declare function includeReversedProperties>(obj: T): T & { [k: string]: keyof T; }; /** * Returns the properties from an object with proper types. * @param obj - The plain object to get keys and values from. * @returns {Iterable} - An iterable array with key value pairs. */ export declare function objectAsIterable(obj: T): [keyof T, TValue][]; /** * Includes reversed keys and values in an Iterable array. * @param {any} obj - The plain object to reverse keys and values from. * @returns {Object} - An iterable array with the original properties together with reversed properties as key value pairs. */ export declare function includeReversedPropertiesAsIterable>(obj: T): [PropertyKey, keyof T | T][]; /** * Removes all properties with falsy values. * @param {Object} obj - The object to clean. * @param {Boolean} recursive - Whether to clean nested objects. */ export declare function cleanFalsyProperties(obj: T, recursive?: boolean): Partial; /** * Converts values in a plain object to strings. Recursive properties are flattened with dot-notation (like `"prop.subprop"`). * * @param {Object} obj - The object to convert to `Record` * @param prefix * @returns */ export declare function flattenKeysWithValuesToStrings(obj: T, prefix?: string): Record; /** * Converts values in a plain object to strings in a key/value-array. Recursive properties are flattened with dot-notation (like `"prop.subprop"`). Array props are supported. * * @param {Object} obj - The object to convert to `Record` * @param prefix * @returns */ export declare function flattenToSearchParams(obj: Record, parentKey?: string): string[][]; //# sourceMappingURL=objects.d.ts.map