Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 598fe04

Browse filesBrowse files
gurgundayruyadorno
authored andcommitted
lib: remove redundant global regexps
PR-URL: #56182 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 9f8f3c9 commit 598fe04
Copy full SHA for 598fe04

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎lib/internal/util/debuglog.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/debuglog.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function formatTime(ms) {
173173
}
174174

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

179179
/**
Collapse file

‎lib/url.js‎

Copy file name to clipboardExpand all lines: lib/url.js
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.