/** * Represents a string value to be escaped during stringification. */ export declare class ToStringEscape { /** * The value to be escaped during stringification. */ readonly value: string; /** * Constructs an instance of ToStringEscape. * @param {string} value - The value to be escaped during stringification. */ constructor(value: string); } /** * Checks if a value is an object. * @param {Record} object - The value to check. * @param {boolean} [strict=true] - Whether to strictly check for non-array objects. * @returns {boolean} True if the value is an object, false otherwise. */ export declare function isObject(object: Record, strict?: boolean): boolean; /** * Checks if an object is empty (has no properties). * @param {Record} object - The object to check. * @returns {boolean} True if the object is empty, false otherwise. */ export declare function isEmpty(object: Record): boolean; /** * Checks if two objects are deeply equal. * @param {Record} object1 - The first object. * @param {Record} object2 - The second object. * @returns {boolean} True if the objects are deeply equal, false otherwise. */ export declare function isEqual(object1: Record, object2: Record): boolean; /** * Deletes all properties of an object. * @param {Record} object - The object to clear. */ export declare function clear(object: Record): void; /** * Creates a deep copy of an object. * @template T * @param {T} object - The object to copy. * @returns {T} A deep copy of the object. */ export declare function copy = Record>(object: T): T; /** * Groups elements of an array by a specified key. * @template T * @param {T[]} list - The array to group. * @param {keyof T | ((item: T) => string | false)} key - The key to group by. * @returns {{ [key: string]: T[] }} An object where keys are unique values determined by the grouping key, * and values are arrays of elements from the original array. */ export declare function groupBy(list: T[], key: keyof T | ((item: T) => string | false)): { [key: string]: T[]; }; /** * Merges two objects deeply. * @template T * @template S * @template Z * @param {T} dest - The destination object to merge into. * @param {S} src - The source object to merge from. * @param {'append' | 'replace' | 'merge'} [strategy='append'] - The merging strategy. * @returns {Z} The merged object. */ export declare function merge, S extends Record = T, Z extends Record = T & S>(dest: T, src: S, strategy?: 'append' | 'replace' | 'merge'): Z; /** * Gets a value from an object at the specified path. * @template T * @param {Record} object - The object to retrieve the value from. * @param {string} path - The path to the value. * @returns {T | undefined} The value at the specified path, or undefined if not found. */ export declare function get(object: Record, path: string): T | undefined; /** * Sets a value in an object at the specified path. * @param {Record} object - The object to set the value in. * @param {string} path - The path to set the value at. * @param {unknown} value - The value to set. * @returns {boolean} True if the value was successfully set, false otherwise. */ export declare function set(object: Record, path: string, value: unknown): boolean; /** * Deletes a value from an object at the specified path. * @param {Record} object - The object to delete the value from. * @param {string} path - The path to delete the value from. * @returns {boolean} True if the value was successfully deleted, false otherwise. */ export declare function del(object: Record, path: string): boolean; /** * Converts a JavaScript object or value to a JSON string with support for * custom stringification of functions and specified string values. * @param {object} object - The value to convert to a JSON string. * @param {string | number} [space] - The space argument may be used to control spacing in the final string. * - If it is a number, successive levels in the stringification will each * be indented by this many space characters (up to 10). * - If it is a string, successive levels will be indented by this string * (or the first ten characters of it). * @returns {string} A JSON string representing the given value with stringified functions and specified string values. */ export declare function toString(object: object, space?: string | number): string;