MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / insertSorted

Function insertSorted

static/libs/codemirror.js:231–235  ·  view source on GitHub ↗
(array, value, score)

Source from the content-addressed store, hash-verified

229}
230
231function insertSorted(array, value, score) {
232 var pos = 0, priority = score(value);
233 while (pos < array.length && score(array[pos]) <= priority) { pos++; }
234 array.splice(pos, 0, value);
235}
236
237function nothing() {}
238

Callers 1

addEditorMethodsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected