MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / get

Method get

src/back/util/map.ts:177–197  ·  view source on GitHub ↗
(key: K)

Source from the content-addressed store, hash-verified

175 }
176
177 get(key: K): V | undefined {
178 const iter = this._iter.reset(key);
179 let node = this._root;
180 while (node) {
181 const val = iter.cmp(node.segment);
182 if (val > 0) {
183 // left
184 node = node.left;
185 } else if (val < 0) {
186 // right
187 node = node.right;
188 } else if (iter.hasNext()) {
189 // mid
190 iter.next();
191 node = node.mid;
192 } else {
193 break;
194 }
195 }
196 return node ? node.value : undefined;
197 }
198
199 delete(key: K): void {
200

Callers 15

getProjectInfoFunction · 0.80
getLanguageInfoFunction · 0.80
getLanguageProgressFunction · 0.80
getProjectBranchesFunction · 0.80
getFilesFromBranchFunction · 0.80
buildFileTranslationFunction · 0.80
fpfssLoginFunction · 0.80
handleProtocolMethod · 0.80
initMethod · 0.80
AppClass · 0.80
downloadFileFunction · 0.80
downloadImageMethod · 0.80

Calls 4

resetMethod · 0.65
cmpMethod · 0.65
hasNextMethod · 0.65
nextMethod · 0.65

Tested by

no test coverage detected