UNPKG

super-utils-plus

Version:

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience

12 lines (11 loc) 501 B
import { PropertyPath } from '../utils/types'; /** * Resolves the value at path of object. If the resolved value is a function * it's invoked with the `this` binding of its parent object. * * @param object - The object to query * @param path - The path of the property to resolve * @param defaultValue - The value returned for undefined resolved values * @returns The resolved value */ export declare function result<T = any>(object: any, path: PropertyPath, defaultValue?: T): T | undefined;