UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

12 lines (11 loc) 366 B
//#region src/components/json-tree-view/get-branch-value.ts function getBranchValues(tree, depth) { let values = []; tree.visit({ onEnter: (node, indexPath) => { if (indexPath.length === 0) return; if (tree.isBranchNode(node) && indexPath.length <= depth) values.push(tree.getNodeValue(node)); } }); return values; } //#endregion export { getBranchValues };