MCPcopy Create free account
hub / github.com/algorithm-visualizer/algorithm-visualizer / add

Method add

src/core/layouts/Layout.js:16–20  ·  view source on GitHub ↗
(key, index = this.children.length)

Source from the content-addressed store, hash-verified

14 }
15
16 add(key, index = this.children.length) {
17 const child = this.getObject(key);
18 this.children.splice(index, 0, child);
19 this.weights.splice(index, 0, 1);
20 }
21
22 remove(key) {
23 const child = this.getObject(key);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected