d2-utilizr
Advanced tools
Comparing version 0.0.18 to 0.0.19
{ | ||
"name": "d2-utilizr", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -96,4 +96,4 @@ // TYPE | ||
// stringReplaceAll | ||
export function stringReplaceAll(str1, str2, ignore) { | ||
return this.replace(new RegExp(str1.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(str2)=="string")?str2.replace(/\$/g,"$$$$"):str2); | ||
export function stringReplaceAll(str, matchValue, replaceValue, ignore) { | ||
return str.replace(new RegExp(matchValue.replace(/([\/\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g,"\\$&"),(ignore?"gi":"g")),(typeof(replaceValue)=="string")?replaceValue.replace(/\$/g,"$$$$"):replaceValue); | ||
} | ||
@@ -100,0 +100,0 @@ |
20107