@babel/helper-validator-identifier
Advanced tools
Comparing version 7.12.11 to 7.14.0
@@ -61,12 +61,19 @@ "use strict"; | ||
for (let _i = 0, _Array$from = Array.from(name); _i < _Array$from.length; _i++) { | ||
const char = _Array$from[_i]; | ||
const cp = char.codePointAt(0); | ||
for (let i = 0; i < name.length; i++) { | ||
let cp = name.charCodeAt(i); | ||
if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) { | ||
const trail = name.charCodeAt(++i); | ||
if ((trail & 0xfc00) === 0xdc00) { | ||
cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); | ||
} | ||
} | ||
if (isFirst) { | ||
isFirst = false; | ||
if (!isIdentifierStart(cp)) { | ||
return false; | ||
} | ||
isFirst = false; | ||
} else if (!isIdentifierChar(cp)) { | ||
@@ -73,0 +80,0 @@ return false; |
{ | ||
"name": "@babel/helper-validator-identifier", | ||
"version": "7.12.11", | ||
"version": "7.14.0", | ||
"description": "Validate identifier/keywords name", | ||
@@ -17,5 +17,7 @@ "repository": { | ||
"devDependencies": { | ||
"charcodes": "^0.2.0", | ||
"unicode-13.0.0": "^0.8.0" | ||
"@babel/helper-validator-identifier-baseline": "npm:@babel/helper-validator-identifier@7.10.4", | ||
"@unicode/unicode-13.0.0": "^1.0.6", | ||
"benchmark": "^2.1.4", | ||
"charcodes": "^0.2.0" | ||
} | ||
} |
@@ -7,3 +7,3 @@ "use strict"; | ||
const start = require("unicode-" + | ||
const start = require("@unicode/unicode-" + | ||
version + | ||
@@ -15,3 +15,3 @@ "/Binary_Property/ID_Start/code-points.js").filter(function (ch) { | ||
const cont = [0x200c, 0x200d].concat( | ||
require("unicode-" + | ||
require("@unicode/unicode-" + | ||
version + | ||
@@ -18,0 +18,0 @@ "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) { |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
18811
251
4