index.js
function getRange(node) {
    if (isScope(node)) {
        return node.nodes
            .map(getRange)
            .reduce(reduceRanges);
    } else if (node.type === 'rule') {
        return specificity.calculate(node.selector)
            .map(result => {
                return result.specificity.split(',').map(v => Number(v));
            })
            .reduce(reduceRange, Object.assign({}, DEFAULT_RANGE));
    }
    return null;
}
function getRange(node) {
    if (isScope(node)) {
        return node.nodes
            .map(getRange)
            .reduce(reduceRanges);
    } else if (node.type === 'rule') {
        return specificity.calculate(node.selector)
            .map(result => {
                return result.specificity.split(',').map(v => Number(v));
            })
            .reduce(reduceRange, Object.assign({}, DEFAULT_RANGE));
    }
    return null;
}
function getRange ( node ) { if ( isScope ( node ) ) { return node . nodes . map ( getRange ) . reduce ( reduceRanges ) ; } else if ( node . type === 'rule' ) { return specificity . calculate ( node . selector ) . map ( result => { return result . specificity . split ( ',' ) . map ( v => Number ( v ) ) ; } ) . reduce ( reduceRange , Object . assign ( { } , DEFAULT_RANGE ) ) ; } return null ; }
Get specificity range of a style rule or a scope
Get specificity range of a style rule or a scope