UNPKG
aureooms-js-integer
Version:
latest (1.0.0)
1.0.0
0.3.2
0.3.1
0.3.0
integer code bricks for JavaScript
aureooms.github.io/js-integer
aureooms/js-integer
aureooms-js-integer
/
src
/
0-legacy
/
others
/
wrap
/
wrapcmp.js
19 lines
(10 loc)
•
210 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export
function
wrapcmp
(
cmp
) {
return
function
(
a, ai, aj, b, bi, bj
){
if
(aj - ai + bi - bj <
0
) {
return
-
cmp
(b, bi, bj, a, ai, aj); }
else
{
return
cmp
(a, ai, aj, b, bi, bj); } }; }