MCPcopy Index your code
hub / github.com/dataease/SQLBot / sortFactory

Function sortFactory

frontend/public/swagger-ui-bundle.js:3536–3560  ·  view source on GitHub ↗
(s, o, i)

Source from the content-addressed store, hash-verified

3534 )
3535 }
3536 function sortFactory(s, o, i) {
3537 o || (o = defaultComparator)
3538 var a = isKeyed(s),
3539 u = 0,
3540 _ = s
3541 .toSeq()
3542 .map(function (o, a) {
3543 return [a, o, u++, i ? i(o, a, s) : o]
3544 })
3545 .toArray()
3546 return (
3547 _.sort(function (s, i) {
3548 return o(s[3], i[3]) || s[2] - i[2]
3549 }).forEach(
3550 a
3551 ? function (s, o) {
3552 _[o].length = 2
3553 }
3554 : function (s, o) {
3555 _[o] = s[1]
3556 }
3557 ),
3558 a ? KeyedSeq(_) : isIndexed(s) ? IndexedSeq(_) : SetSeq(_)
3559 )
3560 }
3561 function maxFactory(s, o, i) {
3562 if ((o || (o = defaultComparator), i)) {
3563 var a = s

Callers 1

Calls 10

isKeyedFunction · 0.85
KeyedSeqFunction · 0.85
isIndexedFunction · 0.85
IndexedSeqFunction · 0.85
SetSeqFunction · 0.85
iFunction · 0.70
oFunction · 0.70
toArrayMethod · 0.45
mapMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected