UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

10 lines (9 loc) 213 B
export function getNodeDepth(node) { let depth = 0; let current = node.parent; while (current && current.kind !== "root") { depth++; current = current.parent; } return depth; }