UNPKG

@ark-ui/react

Version:

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

20 lines (16 loc) 450 B
'use client'; 'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 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; } exports.getBranchValues = getBranchValues;