lib/util/node-event-generator.js
function compareSpecificity(selectorA, selectorB) {
    return selectorA.attributeCount - selectorB.attributeCount ||
        selectorA.identifierCount - selectorB.identifierCount ||
        (selectorA.rawSelector <= selectorB.rawSelector ? -1 : 1);
}
function compareSpecificity(selectorA, selectorB) {
    return selectorA.attributeCount - selectorB.attributeCount ||
        selectorA.identifierCount - selectorB.identifierCount ||
        (selectorA.rawSelector <= selectorB.rawSelector ? -1 : 1);
}
function compareSpecificity ( selectorA , selectorB ) { return selectorA . attributeCount - selectorB . attributeCount || selectorA . identifierCount - selectorB . identifierCount || ( selectorA . rawSelector <= selectorB . rawSelector ? - 1 : 1 ) ; }
Compares the specificity of two selector objects, with CSS-like rules.
@param {ASTSelector} selectorA An AST selector descriptor
@param {ASTSelector} selectorB Another AST selector descriptor
@returns {number}
a value less than 0 if selectorA is less specific than selectorB
a value greater than 0 if selectorA is more specific than selectorB
a value less than 0 if selectorA and selectorB have the same specificity, and selectorA <= selectorB alphabetically
a value greater than 0 if selectorA and selectorB have the same specificity, and selectorA > selectorB alphabetically
Compares the specificity of two selector objects with CSS - like rules .