lib/util-x.js
function sortCompare(left, right) {
        var hasj = $hasOwn(left, 0),
            hask = $hasOwn(right, 0),
            typex,
            typey,
            val;

        if (!hasj && !hask) {
            val = +0;
        } else if (!hasj) {
            val = 1;
        } else if (!hask) {
            val = -1;
        } else {
            typex = typeof left[0];
            typey = typeof right[0];
            if (typex === 'undefined' && typey === 'undefined') {
                val = +0;
            } else if (typex === 'undefined') {
                val = 1;
            } else if (typey === 'undefined') {
                val = -1;
            }
        }

        return val;
    }
function sortCompare(left, right) {
        var hasj = $hasOwn(left, 0),
            hask = $hasOwn(right, 0),
            typex,
            typey,
            val;

        if (!hasj && !hask) {
            val = +0;
        } else if (!hasj) {
            val = 1;
        } else if (!hask) {
            val = -1;
        } else {
            typex = typeof left[0];
            typey = typeof right[0];
            if (typex === 'undefined' && typey === 'undefined') {
                val = +0;
            } else if (typex === 'undefined') {
                val = 1;
            } else if (typey === 'undefined') {
                val = -1;
            }
        }

        return val;
    }
function sortCompare ( left , right ) { var hasj = $hasOwn ( left , 0 ) , hask = $hasOwn ( right , 0 ) , typex , typey , val ; if ( ! hasj && ! hask ) { val = + 0 ; } else if ( ! hasj ) { val = 1 ; } else if ( ! hask ) { val = - 1 ; } else { typex = typeof left [ 0 ] ; typey = typeof right [ 0 ] ; if ( typex === 'undefined' && typey === 'undefined' ) { val = + 0 ; } else if ( typex === 'undefined' ) { val = 1 ; } else if ( typey === 'undefined' ) { val = - 1 ; } } return val ; }
sortCompare function for stableSort.
@private
@function sortCompare
@param {*} object
@param {*} left
@param {*} right
@returns {number}
sortCompare function for stableSort .