MCPcopy Create free account
hub / github.com/reactjs/react-rails / pop

Function pop

lib/assets/react-source/development/react.js:3050–3065  ·  view source on GitHub ↗
(heap)

Source from the content-addressed store, hash-verified

3048 return first === undefined ? null : first;
3049 }
3050 function pop(heap) {
3051 var first = heap[0];
3052
3053 if (first !== undefined) {
3054 var last = heap.pop();
3055
3056 if (last !== first) {
3057 heap[0] = last;
3058 siftDown(heap, last, 0);
3059 }
3060
3061 return first;
3062 } else {
3063 return null;
3064 }
3065 }
3066
3067 function siftUp(heap, node, i) {
3068 var index = i;

Callers 10

advanceTimersFunction · 0.85
workLoopFunction · 0.85
popContextFunction · 0.85
popTopLevelContextObjectFunction · 0.85
popProviderFunction · 0.85
pushHostContainerFunction · 0.85
popHostContainerFunction · 0.85
popHostContextFunction · 0.85
popSuspenseContextFunction · 0.85

Calls 2

siftDownFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected