From 8e58dacce046a6cd0c8ae7ccc2110c414bd2b7d0 Mon Sep 17 00:00:00 2001 From: Curt Eckhart Date: Sat, 19 Sep 2020 12:35:01 -0700 Subject: [PATCH] updated documentation --- docs/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API.md b/docs/API.md index 7f8055b..1b58341 100644 --- a/docs/API.md +++ b/docs/API.md @@ -220,8 +220,8 @@ ptk.get(data, 'foo.b.indexOf(@".")'); // 3 ### getWithDefault ```javascript -var val1 = ptk.get(obj, path, defaultReturnVal); -var val2 = ptk.get(obj, path, defaultReturnVal, arg1, arg2,..., argN); +var val1 = ptk.getWithDefault(obj, path, defaultReturnVal); +var val2 = ptk.getWithDefault(obj, path, defaultReturnVal, arg1, arg2,..., argN); ``` `getWithDefault` behaves exactly the same as `get`. When the resolved value is undefined, either because of an invalid path or because `undefined` is the value resolved by the path, the value in the `defaultReturnVal` argument will be returned in place of the current default return val configured for this path-toolkit instance.