MCPcopy Create free account
hub / github.com/GCWing/BitFun / getAvailableColour

Function getAvailableColour

MiniApp/Demo/git-graph/source/ui.js:214–220  ·  view source on GitHub ↗
(availableColours, startAt)

Source from the content-addressed store, hash-verified

212 };
213
214 function getAvailableColour(availableColours, startAt) {
215 for (let i = 0; i < availableColours.length; i++) {
216 if (startAt > availableColours[i]) return i;
217 }
218 availableColours.push(0);
219 return availableColours.length - 1;
220 }
221
222 function determinePath(vertices, branches, availableColours, commits, commitLookup, onlyFollowFirstParent) {
223 function run(startAt) {

Callers 1

runFunction · 0.70

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected