Skip to content

Commit 5533348

Browse files
committed
Explain utility function
1 parent 691f487 commit 5533348

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/js/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* Return a list of all parent node keys up until `targetLevel`.
3+
*
24
* @param {Array} nodes The nodes to traverse.
35
* @param {number} targetLevel How deep to expand the nodes.
46
* @param {int} currentLevel The current level in the recursive chain.
@@ -20,6 +22,7 @@ function expandNodesToLevel(nodes, targetLevel, currentLevel = 0) {
2022
];
2123
}
2224
});
25+
2326
return expanded;
2427
}
2528

0 commit comments

Comments
 (0)