MCPcopy
hub / github.com/facebook/react / push

Function push

packages/scheduler/src/SchedulerMinHeap.js:17–21  ·  view source on GitHub ↗
(heap: Heap<T>, node: T)

Source from the content-addressed store, hash-verified

15};
16
17export function push<T: Node>(heap: Heap<T>, node: T): void {
18 const index = heap.length;
19 heap.push(node);
20 siftUp(heap, node, index);
21}
22
23export function peek<T: Node>(heap: Heap<T>): T | null {
24 return heap.length === 0 ? null : heap[0];

Callers 4

advanceTimersFunction · 0.90
advanceTimersFunction · 0.90

Calls 2

siftUpFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected