MCPcopy Create free account
hub / github.com/alignoth/alignoth / getNodeDepths

Method getNodeDepths

resources/vega-lite.min.js:9929–9933  ·  view source on GitHub ↗
(e, t, n)

Source from the content-addressed store, hash-verified

9927 }
9928 class Ed extends jd {
9929 getNodeDepths(e, t, n) {
9930 n.set(e, t);
9931 for (const i of e.children) this.getNodeDepths(i, t + 1, n);
9932 return n;
9933 }
9934 optimize(e) {
9935 const t = [...this.getNodeDepths(e, 0, new Map()).entries()].sort(
9936 (e, t) => t[1] - e[1],

Callers 1

optimizeMethod · 0.95

Calls 1

setMethod · 0.45

Tested by

no test coverage detected