UNPKG
tabulator-tables
Version:
alpha (5.0.0-alpha.0)
latest (6.3.1)
6.3.1
6.3.0
6.2.5
6.2.4
6.2.3
6.2.2
6.2.1
6.2.0
6.1.0
6.0.1
6.0.0
5.6.1
5.6.0
5.5.4
5.5.3
5.5.2
5.5.1
5.5.0
5.4.4
5.4.3
5.4.2
5.4.1
5.4.0
5.3.4
5.3.3
5.3.2
5.3.1
5.3.0
5.2.7
5.2.6
5.2.5
5.2.4
5.2.3
5.2.2
5.2.1
5.2.0
5.1.8
5.1.7
5.1.6
5.1.5
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.10
5.0.9
5.0.8
5.0.7
5.0.6
5.0.5
5.0.3
5.0.2
5.0.1
5.0.0
5.0.0-alpha.0
4.9.3
4.9.2
4.9.1
4.9.0
4.8.4
4.8.3
4.8.2
4.8.1
4.8.0
4.7.2
4.7.1
4.7.0
4.6.3
4.6.2
4.6.1
4.6.0
4.5.3
4.5.2
4.5.1
4.5.0
4.4.3
4.4.2
4.4.1
4.4.0
4.3.0
4.2.7
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.5
4.1.4
4.1.3
4.1.2
4.1.1
4.1.0
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
Interactive table generation JavaScript library
tabulator.info
olifolkerd/tabulator
tabulator-tables
/
src
/
js
/
modules
/
Sort
/
defaults
/
sorters
/
boolean.js
7 lines
(6 loc)
•
255 B
JavaScript
View Raw
1
2
3
4
5
6
7
//sort booleans
export
default
function
(
a, b, aRow, bRow, column, dir, params
){
var
el1 = a ===
true
|| a ===
"true"
|| a ===
"True"
|| a ===
1
?
1
:
0
;
var
el2 = b ===
true
|| b ===
"true"
|| b ===
"True"
|| b ===
1
?
1
:
0
;
return
el1 - el2; }