Comparing version 0.1.0 to 0.2.0
(function() { | ||
var specificity; | ||
specificity = require('specificity'); | ||
module.exports = { | ||
specificity: require('../vendor/specificity') | ||
specificity: function(selector) { | ||
var a, b, c, i, resultString, _ref; | ||
resultString = specificity.calculate(selector)[0].specificity; | ||
_ref = resultString.split(',').map(function(value) { | ||
return parseInt(value); | ||
}), i = _ref[0], a = _ref[1], b = _ref[2], c = _ref[3]; | ||
return (a * 100) + (b * 10) + (c * 1); | ||
} | ||
}; | ||
}).call(this); |
{ | ||
"name": "clear-cut", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Calculate specificity of CSS selectors", | ||
@@ -30,3 +30,6 @@ "main": "./lib/main.js", | ||
"grunt-coffeelint": "0.0.6" | ||
}, | ||
"dependencies": { | ||
"specificity": "0.1.3" | ||
} | ||
} |
@@ -14,4 +14,4 @@ # clear cut [![Build Status](https://travis-ci.org/atom/clear-cut.png?branch=master)](https://travis-ci.org/atom/clear-cut) | ||
specificity('body') # 1 | ||
specificity('#footer') # 1000000 | ||
specificity('.error.message') # 2000 | ||
specificity('#footer') # 100 | ||
specificity('.error.message') # 20 | ||
``` | ||
@@ -18,0 +18,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1688
1
3
14
2
+ Addedspecificity@0.1.3
+ Addedspecificity@0.1.3(transitive)