nice-ui
Version:
React design system, components, and utilities
13 lines (12 loc) • 344 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const walkNodesUp_1 = require("./walkNodesUp");
const rootDepth = (ast, idx) => {
let count = 0;
(0, walkNodesUp_1.default)(ast, idx, (node) => {
if (node.type === 'root')
count++;
});
return count;
};
exports.default = rootDepth;
;