/** * Access property in an object using a string path. Similar to lodash.get * @param access - path to access * @param tar - target object * @param throwOnInvalid - throw error if invalid access or property is undefined. Default is false * * @example * ```js * const obj = {a: {b: {c: 1}}} * const c = deepAccessObject(['a', 'b', 'c'], obj) * console.log(c) // 1 * ``` * * @category JS Object */ export declare function deepAccessObject(access: string | string[], tar: any, throwOnInvalid?: boolean): any; /** * Find the key of an object with a given value. * @param object - object to search * @param value - value to search for * * @category JS Object */ export declare function getKeyByValue(object: Record, value: any): string | undefined; /** * Check if an object has a property. Same as {@link Object.hasOwn} or {@link Object.hasOwnProperty} * @param o * @param v * * @category JS Object */ export declare function objectHasOwn(o: T, v: keyof T): boolean; /** * Execute a function on each property of an object and return the result as a new object * This allows in place modification of the object. * To create a new object, set inPlace to false, or use {@link objectMap2} to modify the keys as well * Similar to {@link Array.map} but for objects. * @param obj - object * @param fn - function to execute on each property * @param inPlace - if true, the original object is modified. Default is true * * @category JS Object */ export declare function objectMap(obj: Record, fn: (val: V, key: T) => V, inPlace?: boolean): Record; /** * Shorthand for `Object.fromEntries(Object.entries(obj).map(fn))` * Similar to {@link objectMap} but uses {@link Object.fromEntries} to create the new object, so keys can also be changed. * @param obj * @param fn * * @category JS Object */ export declare function objectMap2(obj: Record, fn: ([key, val]: [T, V]) => [T, V]): Record; //# sourceMappingURL=object.d.ts.map