imports/vx/both/code/util.js
/**
     * Compare two strings and return a value suitable for sort comparison,
     * but using special care to deal with null values.
     *
     * @param {string} stringA String A.
     * @param {string} stringB String B.
     * @return {number} Either -1, 0, 1.
     */
Compare two strings and return a value suitable for sort comparison,
but using special care to deal with null values.

@param {string} stringA String A.
@param {string} stringB String B.
Compare two strings and return a value suitable for sort comparison but using special care to deal with null values . @param { string } stringA String A . @param { string } stringB String B .
safeCompare(stringA, stringB) {
        if (stringA && stringB) {
            return stringA.localeCompare(stringB)
        }
        if (!stringA && !stringB) {
            return 0
        }
        if (stringA) return +1
        if (stringB) return -1
        return 0
    }
safeCompare ( stringA , stringB ) { if ( stringA && stringB ) { return stringA . localeCompare ( stringB ) } if ( ! stringA && ! stringB ) { return 0 } if ( stringA ) return + 1 if ( stringB ) return - 1 return 0 }
Compare two strings and return a value suitable for sort comparison,
 but using special care to deal with null values.
Compare two strings and return a value suitable for sort comparison but using special care to deal with null values .