From 080f2f8bb60759eba23467de45f0b2df2beb367b Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Tue, 17 Nov 2020 17:14:29 +0000 Subject: [PATCH] Updated jsdoc for get function --- ts-src/get.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ts-src/get.ts b/ts-src/get.ts index 65d27bc..7935363 100644 --- a/ts-src/get.ts +++ b/ts-src/get.ts @@ -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) => {