css.escape
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,2 +0,2 @@ | ||
/*! https://mths.be/cssescape v1.1.0 by @mathias | MIT license */ | ||
/*! https://mths.be/cssescape v1.2.0 by @mathias | MIT license */ | ||
;(function(root) { | ||
@@ -10,8 +10,2 @@ | ||
var InvalidCharacterError = function(message) { | ||
this.message = message; | ||
}; | ||
InvalidCharacterError.prototype = new Error; | ||
InvalidCharacterError.prototype.name = 'InvalidCharacterError'; | ||
if (!CSS.escape) { | ||
@@ -31,8 +25,7 @@ // https://drafts.csswg.org/cssom/#serialize-an-identifier | ||
// If the character is NULL (U+0000), then throw an | ||
// `InvalidCharacterError` exception and terminate these steps. | ||
// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER | ||
// (U+FFFD) escaped as a code point. | ||
if (codeUnit == 0x0000) { | ||
throw new InvalidCharacterError( | ||
'Invalid character: the input contains U+0000.' | ||
); | ||
result += '\\FFFD '; | ||
continue; | ||
} | ||
@@ -39,0 +32,0 @@ |
{ | ||
"name": "css.escape", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "A robust polyfill for the `CSS.escape` utility method as defined in CSSOM.", | ||
@@ -32,8 +32,8 @@ "homepage": "https://mths.be/cssescape", | ||
"cover": "istanbul cover --report html --verbose --dir coverage tests/tests.js", | ||
"coveralls": "istanbul cover --verbose --dir coverage tests/tests.js && coveralls < coverage/lcov.info|coveralls < coverage/lcov.info; rm -rf coverage/lcov*" | ||
"coveralls": "istanbul cover --verbose --dir coverage tests/tests.js && coveralls < coverage/lcov.info; rm -rf coverage/lcov*" | ||
}, | ||
"devDependencies": { | ||
"coveralls": "^2.11.2", | ||
"istanbul": "^0.3.11" | ||
"coveralls": "^2.11.4", | ||
"istanbul": "^0.4.1" | ||
} | ||
} |
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
5992
78