Skip to content

Commit e34ee1f

Browse files
committed
refactor(utils): update jsdocs of getProp and setProp
1 parent d5c25f0 commit e34ee1f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/utils.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
/**
22
* Get property defined by dot notation in string.
3-
* Based on https://github.com/dy/dotprop (MIT)
43
*
5-
* @param {Object} holder Target object where to look property up
6-
* @param {string | string[]} propName Dot notation, like 'this.a.b.c'
7-
* @return {*} A property value
4+
* Based on {@link https://github.com/dy/dotprop } (MIT)
5+
*
6+
* @param {Object} holder - Target object where to look property up.
7+
* @param {string | string[]} propName - Dot notation, like `'a.b.c'` or `['a', 'b', 'c']`.
8+
* @return {*} - A property value.
89
*/
910
export function getProp (holder, propName) {
1011
if (!propName || !holder) {
@@ -27,11 +28,12 @@ export function getProp (holder, propName) {
2728

2829
/**
2930
* Set property defined by dot notation in string.
30-
* Based on https://github.com/lukeed/dset (MIT)
3131
*
32-
* @param {Object} holder Target object where to look property up
33-
* @param {string | string[]} propName Dot notation, like 'this.a.b.c'
34-
* @param {*} value The value to be set
32+
* Based on {@link https://github.com/lukeed/dset} (MIT)
33+
*
34+
* @param {Object} holder - Target object where to look property up.
35+
* @param {string | string[]} propName - Dot notation, like `'a.b.c'` or `['a', 'b', 'c']`.
36+
* @param {*} value - The value to be set.
3537
*/
3638
export function setProp (holder, propName, value) {
3739
const propParts = Array.isArray(propName) ? propName : (propName + '').split('.')

0 commit comments

Comments
 (0)