MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / findOrCreateTree

Method findOrCreateTree

lib/clientstate.ts:456–465  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

454 }
455
456 findOrCreateTree(id: number) {
457 let tree = this.findTreeById(id);
458 if (tree) return tree;
459
460 tree = new ClientStateTree();
461 tree.id = id;
462 this.trees.push(tree);
463
464 return tree;
465 }
466}

Calls 2

findTreeByIdMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected