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

Method _forEach

src/back/util/map.ts:320–336  ·  view source on GitHub ↗
(node: TernarySearchTreeNode<K, V> | undefined, callback: (value: V, index: K) => any)

Source from the content-addressed store, hash-verified

318 }
319
320 private _forEach(node: TernarySearchTreeNode<K, V> | undefined, callback: (value: V, index: K) => any) {
321 if (node) {
322 // left
323 this._forEach(node.left, callback);
324
325 // node
326 if (node.value) {
327 // callback(node.value, this._iter.join(parts));
328 callback(node.value, node.key);
329 }
330 // mid
331 this._forEach(node.mid, callback);
332
333 // right
334 this._forEach(node.right, callback);
335 }
336 }
337}

Callers 2

nextMethod · 0.95
forEachMethod · 0.95

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected