Socket
Socket
Sign inDemoInstall

regexpu-core

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexpu-core - npm Package Compare versions

Comparing version 4.5.5 to 4.6.0

4

package.json
{
"name": "regexpu-core",
"version": "4.5.5",
"version": "4.6.0",
"description": "regexpu’s core functionality (i.e. `rewritePattern(pattern, flag)`), capable of translating ES6 Unicode regular expressions to ES5.",

@@ -64,5 +64,5 @@ "homepage": "https://mths.be/regexpu",

"mocha": "^6.2.0",
"regexpu-fixtures": "^2.1.2",
"regexpu-fixtures": "^2.1.3",
"unicode-12.1.0": "^0.8.0"
}
}

@@ -28,6 +28,2 @@ 'use strict';

);
// Prepare a Regenerate set containing all code points that are supposed to be
// matched by `/./` (only BMP code points).
const DOT_SET = DOT_SET_UNICODE.clone()
.intersection(BMP_SET);

@@ -44,7 +40,4 @@ const getCharacterClassEscapeSet = (character, unicode, ignoreCase) => {

const getDotSet = (unicode, dotAll) => {
if (dotAll) {
return unicode ? UNICODE_SET : BMP_SET;
}
return unicode ? DOT_SET_UNICODE : DOT_SET;
const getUnicodeDotSet = (dotAll) => {
return dotAll ? UNICODE_SET : DOT_SET_UNICODE;
};

@@ -200,6 +193,11 @@

case 'dot':
update(
item,
getDotSet(config.unicode, config.dotAll).toString(regenerateOptions)
);
if (config.unicode) {
update(
item,
getUnicodeDotSet(config.dotAll).toString(regenerateOptions)
);
} else if (config.dotAll) {
// TODO: consider changing this at the regenerate level.
update(item, '[\\s\\S]');
}
break;

@@ -227,3 +225,5 @@ case 'characterClass':

case 'group':
groups.lastIndex++;
if (item.behavior == 'normal') {
groups.lastIndex++;
}
if (item.name) {

@@ -230,0 +230,0 @@ const name = item.name.value;

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