Updated jsdoc for get function

This commit is contained in:
Martin Donnelly 2020-11-17 17:14:29 +00:00
parent b0e843fd3e
commit 080f2f8bb6

View File

@ -1,8 +1,11 @@
/**
* Get the value of an item inside an object
* @param obj The source object
* @param path The path to the object
* @param defaultValue A default value to be returned
*
* @param obj
* @param path
* @param defaultValue
* @example
* U.get({ a: 1, b: 2 }, 'b') // => 2
*/
export function get(obj: Object, path: string, defaultValue: any = undefined): any {
const travel = (regexp: any) => {