Socket
Socket
Sign inDemoInstall

specificity

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

specificity - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

4

package.json
{
"name" : "specificity",
"version" : "0.1.0",
"version" : "0.1.1",
"description" : "Calculate the specificity of a CSS selector",
"keywords" : "CSS, specificity",
"keywords" : ["CSS", "specificity"],
"homepage" : "https://github.com/keeganstreet/specificity",

@@ -7,0 +7,0 @@ "author" : {

@@ -8,3 +8,3 @@ # Specificity Calculator

```js
SPECIFICITY.calculate('ul#nav li.active a'); // [{ specificity: '0,1,0,0' }]
SPECIFICITY.calculate('ul#nav li.active a'); // [{ specificity: '0,1,1,3' }]
```

@@ -16,3 +16,3 @@

var specificity = require('specificity');
specificity.calculate('ul#nav li.active a');
specificity.calculate('ul#nav li.active a'); // [{ specificity: '0,1,1,3' }]
```

@@ -25,3 +25,3 @@

```js
SPECIFICITY.calculate('ul#nav li.active a, body.ie7 .col_3 h2 ~ h2');
SPECIFICITY.calculate('ul#nav li.active a, body.ie7 .col_3 h2 ~ h2'); // [{ specificity: '0,1,1,3' }, { specificity: '0,0,2,3' }]
```

@@ -31,3 +31,3 @@

The `specificity.calculate` function returns an array containing a result object for each selector input. The result objects contain the following properties:
The `specificity.calculate` function returns an array containing a result object for each selector input. Each result object has the following properties:

@@ -45,4 +45,6 @@ * `selector`: the input

result = specificity.calculate('ul#nav li.active a');
console.log(result);
/* result =
[ {

@@ -59,2 +61,3 @@ selector: 'ul#nav li.active a',

} ]
*/
```
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