MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / compare

Function compare

static/js/status.js:219–225  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

217}
218
219function compare (index) {
220 return function (a, b) {
221 var valA = getCellValue(a, index)
222 var valB = getCellValue(b, index)
223 return $.isNumeric(valA) && $.isNumeric(valB) ? valA - valB : valA.localeCompare(valB)
224 }
225}
226
227function getCellValue (row, index) {
228 return $(row).children('.status_cell').eq(index).html()

Callers 1

tableSortFunction · 0.85

Calls 1

getCellValueFunction · 0.85

Tested by

no test coverage detected