MCPcopy Index your code
hub / github.com/DHTMLX/gantt / insertSorted

Function insertSorted

samples/common/codehighlight/codemirror.js:247–251  ·  view source on GitHub ↗
(array, value, score)

Source from the content-addressed store, hash-verified

245 }
246
247 function insertSorted(array, value, score) {
248 var pos = 0, priority = score(value);
249 while (pos < array.length && score(array[pos]) <= priority) { pos++; }
250 array.splice(pos, 0, value);
251 }
252
253 function nothing() {}
254

Callers 1

addEditorMethodsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected