MCPcopy Index your code
hub / github.com/tinyplex/tinybase / arrayIsSorted

Function arrayIsSorted

docs/pseudo.esm.sh/tinybase@9.0.0/index.js:85–88  ·  view source on GitHub ↗
(array, sorter)

Source from the content-addressed store, hash-verified

83var arrayEvery = (array, cb) => array.every(cb);
84var arrayIsEqual = (array1, array2) => size(array1) === size(array2) && arrayEvery(array1, (value1, index) => array2[index] === value1);
85var arrayIsSorted = (array, sorter) => arrayEvery(
86 array,
87 (value, index) => index == 0 || sorter(array[index - 1], value) <= 0
88);
89var arraySort = (array, sorter) => array.sort(sorter);
90var arrayForEach = (array, cb) => array.forEach(cb);
91var arrayMap = (array, cb) => array.map(cb);

Callers 1

setIndexDefinitionFunction · 0.70

Calls 1

arrayEveryFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…