Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
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
main
Function · 0.95
insert
Function · 0.45
#createTimer
Method · 0.45
tick
Method · 0.45
Calls
1
percolateUp
Method · 0.95
Tested by
no test coverage detected