MCPcopy Create free account
hub / github.com/breck7/scroll / insertSorted

Function insertSorted

external/.scrollLibs.js:765–772  ·  view source on GitHub ↗
(array, value, score)

Source from the content-addressed store, hash-verified

763 }
764
765 function insertSorted(array, value, score) {
766 var pos = 0,
767 priority = score(value)
768 while (pos < array.length && score(array[pos]) <= priority) {
769 pos++
770 }
771 array.splice(pos, 0, value)
772 }
773
774 function nothing() {}
775

Callers 1

addEditorMethodsFunction · 0.85

Calls 1

scoreFunction · 0.85

Tested by

no test coverage detected