MCPcopy
hub / github.com/plotly/dash / pop

Function pop

dash/deps/react@16.14.0.js:2252–2267  ·  view source on GitHub ↗
(heap)

Source from the content-addressed store, hash-verified

2250 return first === undefined ? null : first;
2251 }
2252 function pop(heap) {
2253 var first = heap[0];
2254
2255 if (first !== undefined) {
2256 var last = heap.pop();
2257
2258 if (last !== first) {
2259 heap[0] = last;
2260 siftDown(heap, last, 0);
2261 }
2262
2263 return first;
2264 } else {
2265 return null;
2266 }
2267 }
2268
2269 function siftUp(heap, node, i) {
2270 var index = i;

Callers 2

advanceTimersFunction · 0.70
workLoopFunction · 0.70

Calls 2

popMethod · 0.80
siftDownFunction · 0.70

Tested by

no test coverage detected