UNPKG

@n3okill/utils

Version:
9 lines (8 loc) 443 B
/** * Return the value of a property in the object * @param obj The object to search for the property * @param {string | Array<string>} name The name of the property can be on the form "a.b.c[1].d" * @param defaultValue Default value to be returned if the property don't exist * @returns {any} Value of the property or defaultValue */ export declare function getProperty(obj: any, name: string | Array<string>, defaultValue?: any): any;