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

@babel/helper-validator-identifier

Package Overview
Dependencies
Maintainers
6
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-validator-identifier - npm Package Compare versions

Comparing version 7.12.11 to 7.14.0

17

lib/identifier.js

@@ -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) {

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