MCPcopy Index your code
hub / github.com/caseywebdev/react-list / push

Function push

docs/index.js:2126–2136  ·  view source on GitHub ↗
(heap, node)

Source from the content-addressed store, hash-verified

2124
2125"use strict";
2126function push(heap, node) {
2127 var index = heap.length;
2128 heap.push(node);
2129 a: for (; 0 < index; ) {
2130 var parentIndex = (index - 1) >>> 1,
2131 parent = heap[parentIndex];
2132 if (0 < compare(parent, node))
2133 (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
2134 else break a;
2135 }
2136}
2137function peek(heap) {
2138 return 0 === heap.length ? null : heap[0];
2139}

Callers 14

advanceTimersFunction · 0.85
index.jsFile · 0.85
pushHostContainerFunction · 0.85
pushHostContextFunction · 0.85
pushHiddenContextFunction · 0.85
pushTransitionFunction · 0.85

Calls 1

compareFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…