Comparing version 1.0.0 to 2.0.0
12
index.js
@@ -86,3 +86,3 @@ /** | ||
exports.specificity = function(selector) { | ||
exports.calculateSpecificity = function(selector) { | ||
var specificity = specificityCache[selector]; | ||
@@ -100,3 +100,3 @@ if (specificity === undefined) { | ||
exports.isValidSelector = function(selector) { | ||
exports.isSelectorValid = function(selector) { | ||
var valid = validSelectorCache[selector]; | ||
@@ -114,2 +114,10 @@ if (valid === undefined) { | ||
} | ||
exports.validateSelector = function(selector) { | ||
if (!exports.isSelectorValid(selector)) { | ||
var error = new Error("'#{selector}' is not a valid selector") | ||
error.code = 'EBADSELECTOR' | ||
throw error; | ||
} | ||
} | ||
} |
{ | ||
"name": "clear-cut", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Calculate specificity of CSS selectors", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6246
99