MCPcopy Index your code
hub / github.com/react/react / compare

Function compare

packages/scheduler/src/SchedulerMinHeap.js:91–95  ·  view source on GitHub ↗
(a: Node, b: Node)

Source from the content-addressed store, hash-verified

89}
90
91function compare(a: Node, b: Node) {
92 // Compare sort index first, then task id.
93 const diff = a.sortIndex - b.sortIndex;
94 return diff !== 0 ? diff : a.id - b.id;
95}

Callers 4

siftUpFunction · 0.85
siftDownFunction · 0.85
binSearchFunction · 0.85
updateMemoComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected