named-regexp-groups
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -25,4 +25,11 @@ 'use strict'; | ||
if (str instanceof RegExp) { | ||
flags = flags || str.flags || ''; | ||
/* istanbul ignore if */ | ||
if (!flags) { | ||
// No RegExp.flags for node < v6. | ||
if (str.ignoreCase) flags += 'i'; | ||
if (str.multiline) flags += 'm'; | ||
if (str.global) flags += 'g'; | ||
} | ||
str = str.source; | ||
flags = str.flags; | ||
} | ||
@@ -29,0 +36,0 @@ |
{ | ||
"name": "named-regexp-groups", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Regular expressions with named capture groups and named back-references", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
@@ -23,4 +23,10 @@ /*! | ||
if (str instanceof RegExp) { | ||
flags = flags || str.flags || '' | ||
/* istanbul ignore if */ | ||
if (!flags) { // No RegExp.flags for node < v6. | ||
if (str.ignoreCase) flags += 'i' | ||
if (str.multiline) flags += 'm' | ||
if (str.global) flags += 'g' | ||
} | ||
str = str.source | ||
flags = str.flags | ||
} | ||
@@ -27,0 +33,0 @@ |
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
23579
572