regexpu-core
Advanced tools
Comparing version 5.3.0 to 5.3.1
{ | ||
"name": "regexpu-core", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"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": "^10.1.0", | ||
"regexpu-fixtures": "mathiasbynens/regexpu-fixtures", | ||
"regexpu-fixtures": "^2.1.6", | ||
"@unicode/unicode-15.0.0": "^1.3.1" | ||
} | ||
} |
@@ -864,3 +864,3 @@ 'use strict'; | ||
if (value.disabling.length > 0){ | ||
value.disabling.split("").forEach((flag)=>{ | ||
value.disabling.split('').forEach((flag)=>{ | ||
allDisabledModifiers[flag] = true | ||
@@ -886,12 +886,15 @@ }); | ||
const onNewFlags = options && options.onNewFlags; | ||
if (onNewFlags) onNewFlags(flags.split('').filter((flag) => { | ||
switch (flag) { | ||
case 'u': | ||
return !config.transform.unicodeFlag; | ||
case 'v': | ||
return !config.transform.unicodeSetsFlag; | ||
default: | ||
return !config.modifiersData[flag]; | ||
if (onNewFlags) { | ||
let newFlags = flags.split('').filter((flag) => !config.modifiersData[flag]).join(''); | ||
if (config.transform.unicodeSetsFlag) { | ||
newFlags = newFlags.replace('v', 'u'); | ||
} | ||
}).join('')); | ||
if (config.transform.unicodeFlag) { | ||
newFlags = newFlags.replace('u', ''); | ||
} | ||
if (config.transform.dotAllFlag === 'transform') { | ||
newFlags = newFlags.replace('s', ''); | ||
} | ||
onNewFlags(newFlags); | ||
} | ||
@@ -898,0 +901,0 @@ return generate(tree); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53654
1582
0