lib/utils/utils.js
function sortAttrs(attrs) {
    return attrs.sort(function (a, b) {
        if (a.name < b.name) {
            return -1;
        } else if (a.name > b.name) {
            return 1;
        } else if (a.value < b.value) {
            return -1;
        } else if (a.value > b.value) {
            return 1;
        }

        return 0;
    });
}
function sortAttrs(attrs) {
    return attrs.sort(function (a, b) {
        if (a.name < b.name) {
            return -1;
        } else if (a.name > b.name) {
            return 1;
        } else if (a.value < b.value) {
            return -1;
        } else if (a.value > b.value) {
            return 1;
        }

        return 0;
    });
}
function sortAttrs ( attrs ) { return attrs . sort ( function ( a , b ) { if ( a . name < b . name ) { return - 1 ; } else if ( a . name > b . name ) { return 1 ; } else if ( a . value < b . value ) { return - 1 ; } else if ( a . value > b . value ) { return 1 ; } return 0 ; } ) ; }
Sorts the attributes in alphabetical order
@param {Array} attrs
@returns {Array}
Sorts the attributes in alphabetical order