UNPKG

@dimanech/cssstat-core

Version:
20 lines (17 loc) 384 B
const _ = require('lodash') module.exports = function (selectors, graph) { selectors = selectors || this.values graph = graph || this.getSpecificityGraph() return _.zipWith( selectors, graph, function (a, b) { return { selector: a, specificity: b } }) .sort(function (a, b) { return b.specificity - a.specificity }) }