MCPcopy Index your code
hub / github.com/nodejs/node / insert

Method insert

lib/internal/priority_queue.js:22–28  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

20 }
21
22 insert(value) {
23 const heap = this.#heap;
24 const pos = ++this.#size;
25 heap[pos] = value;
26
27 this.percolateUp(pos);
28 }
29
30 peek() {
31 return this.#heap[1];

Callers 4

mainFunction · 0.95
insertFunction · 0.45
#createTimerMethod · 0.45
tickMethod · 0.45

Calls 1

percolateUpMethod · 0.95

Tested by

no test coverage detected