Skip to content

Commit f10239f

Browse files
gurgundayaduh95
authored andcommitted
lib: remove redundant global regexps
PR-URL: #56182 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent fa667d6 commit f10239f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎lib/internal/util/debuglog.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function formatTime(ms){
173173
}
174174

175175
functionsafeTraceLabel(label){
176-
returnlabel.replace(/\\/g,'\\\\').replaceAll('"','\\"');
176+
returnlabel.replaceAll('\\','\\\\').replaceAll('"','\\"');
177177
}
178178

179179
/**

‎lib/url.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ Url.prototype.format = function format(){
705705
}
706706
}
707707

708-
search=search.replace(/#/g,'%23');
708+
search=search.replaceAll('#','%23');
709709

710710
if(hash&&hash.charCodeAt(0)!==CHAR_HASH)
711711
hash='#'+hash;

0 commit comments

Comments
(0)