Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clear-cut

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clear-cut - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

13

lib/main.js
(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);

5

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc