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

regjsparser

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regjsparser - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

2

package.json
{
"name": "regjsparser",
"version": "0.6.3",
"version": "0.6.4",
"author": "'Julian Viereck' <julian.viereck@gmail.com>",

@@ -5,0 +5,0 @@ "license": "BSD-2-Clause",

@@ -236,8 +236,2 @@ // regjsparser

if (hasUnicodeFlag) {
if (_char === '}') {
bail("unescaped or unmatched closing brace");
}
if (_char === ']') {
bail("unescaped or unmatched closing bracket");
}
var second;

@@ -491,3 +485,3 @@ if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {

var atom = parseAtom();
var atom = parseAtomAndExtendedAtom();
if (!atom) {

@@ -616,3 +610,8 @@ bail('Expected atom');

function parseAtom() {
function parseAtomAndExtendedAtom() {
// Parsing Atom and ExtendedAtom together due to redundancy.
// ExtendedAtom is defined in Apendix B of the ECMA-262 standard.
//
// SEE: https://www.ecma-international.org/ecma-262/10.0/index.html#prod-annexB-ExtendedPatternCharacter
//
// Atom ::

@@ -625,2 +624,6 @@ // PatternCharacter

// ( ? : Disjunction )
// ExtendedAtom ::
// ExtendedPatternCharacter
// ExtendedPatternCharacter ::
// SourceCharacter but not one of ^$\.*+?()[|

@@ -631,7 +634,10 @@ var res;

// implementations: ']'.match(/]/);
// if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
if (res = matchReg(/^[^^$\\.*+?(){[|]/)) {
if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
// PatternCharacter
return createCharacter(res);
}
else if (!hasUnicodeFlag && (res = matchReg(/^(?:]|})/))) {
// ExtendedPatternCharacter
return createCharacter(res);
}
else if (match('.')) {

@@ -638,0 +644,0 @@ // .

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