@contrail/util
Advanced tools
Comparing version 1.0.29 to 1.0.30
@@ -8,2 +8,3 @@ "use strict"; | ||
let startIndex = 0; | ||
let hasMatches = false; | ||
while ((match = regEx.exec(string)) !== null) { | ||
@@ -16,5 +17,9 @@ let matchedString = match[0]; | ||
startIndex += index + matchedString.length; | ||
hasMatches = true; | ||
} | ||
if (!(newString === null || newString === void 0 ? void 0 : newString.length) && !hasMatches) { | ||
newString = string; | ||
} | ||
return newString; | ||
} | ||
exports.replaceAllWithFunction = replaceAllWithFunction; |
{ | ||
"name": "@contrail/util", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "General javascript utilities", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
22372
578