MCPcopy
hub / github.com/react/react / peek

Function peek

packages/scheduler/src/SchedulerMinHeap.js:23–25  ·  view source on GitHub ↗
(heap: Heap<T>)

Source from the content-addressed store, hash-verified

21}
22
23export function peek<T: Node>(heap: Heap<T>): T | null {
24 return heap.length === 0 ? null : heap[0];
25}
26
27export function pop<T: Node>(heap: Heap<T>): T | null {
28 if (heap.length === 0) {

Callers 8

advanceTimersFunction · 0.90
handleTimeoutFunction · 0.90
workLoopFunction · 0.90
advanceTimersFunction · 0.90
handleTimeoutFunction · 0.90
workLoopFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected