static defaultComparator(v1, v2) {
        if (isNil(v1) && isNil(v2)) return 0;
        if (isNil(v1)) return -1;
        if (isNil(v2)) return 1;

        if (v1.toNumber) v1 = v1.toNumber();
        if (v2.toNumber) v2 = v2.toNumber();

        const quickCompare = (a, b) => a > b ? 1 : (a < b ? -1 : 0);

        if (typeof v1 === 'string') {
            try {
                return v1.localeCompare(v2);
            } catch (e) {
                // if something wrong with localeCompare, e.g. not supported
                // by browser, then just continue with the quick one.
                return quickCompare(v1, v2);
            }
        }
        return quickCompare(v1, v2);
    }
/**
     * Static comparator to use when a GridSorter instance is not available.
     */
Static comparator to use when a GridSorter instance is not available.
Static comparator to use when a GridSorter instance is not available .
static defaultComparator(v1, v2) {
        if (isNil(v1) && isNil(v2)) return 0;
        if (isNil(v1)) return -1;
        if (isNil(v2)) return 1;
        if (v1.toNumber) v1 = v1.toNumber();
        if (v2.toNumber) v2 = v2.toNumber();
        const quickCompare = (a, b) => a > b ? 1 : (a < b ? -1 : 0);
        if (typeof v1 === 'string') {
            try {
                return v1.localeCompare(v2);
            } catch (e) {
                return quickCompare(v1, v2);
            }
        }
        return quickCompare(v1, v2);
    }
static defaultComparator ( v1 , v2 ) { if ( isNil ( v1 ) && isNil ( v2 ) ) return 0 ; if ( isNil ( v1 ) ) return - 1 ; if ( isNil ( v2 ) ) return 1 ; if ( v1 . toNumber ) v1 = v1 . toNumber ( ) ; if ( v2 . toNumber ) v2 = v2 . toNumber ( ) ; const quickCompare = ( a , b ) => a > b ? 1 : ( a < b ? - 1 : 0 ) ; if ( typeof v1 === 'string' ) { try { return v1 . localeCompare ( v2 ) ; } catch ( e ) { return quickCompare ( v1 , v2 ) ; } } return quickCompare ( v1 , v2 ) ; }
Static comparator to use when a GridSorter instance is not available.
Static comparator to use when a GridSorter instance is not available .
// if something wrong with localeCompare, e.g. not supported // by browser, then just continue with the quick one.