mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-17 22:06:41 +02:00
14 lines
268 B
JavaScript
14 lines
268 B
JavaScript
/**
|
|
* Sorting utilities
|
|
*/
|
|
|
|
export const ignoreCase = (a, b) => {
|
|
let x = a.toLowerCase();
|
|
let y = b.toLowerCase();
|
|
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
|
}
|
|
|
|
export const numSortAsc = (a, b) => (a - b);
|
|
|
|
export const numSortDesc = (a, b) => (b - a);
|