We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RegExp.escape
debugEnv
1 parent 66e9dc8 commit bbf7688Copy full SHA for bbf7688
lib/internal/util/debuglog.js
@@ -35,7 +35,7 @@ function initializeDebugEnv(debugEnv) {
35
if (debugEnv) {
36
// This is run before any user code, it's OK not to use primordials.
37
debugEnv = RegExpEscape(debugEnv)
38
- .replaceAll(/(?<=[^\\]|^)\\\*/g, '[^.]*')
+ .replaceAll(RegExpEscape('*'), '[^.]*')
39
.replaceAll(RegExpEscape(','), '$|^');
40
const debugEnvRegex = new RegExp(`^${debugEnv}$`, 'i');
41
testEnabled = (str) => RegExpPrototypeExec(debugEnvRegex, str) !== null;
0 commit comments