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 4de7b03

Browse filesBrowse files
TrottItalo A. Casas
authored andcommitted
lib: refactor bootstrap_node.js regular expression
* use `+` instead of `*` where one-or-more is required * switch from String.prototype.match() to RegExp.prototype.test() PR-URL: #10749 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
1 parent 06acf88 commit 4de7b03
Copy full SHA for 4de7b03

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+1
-3
lines changed
Open diff view settings
Collapse file

‎lib/internal/bootstrap_node.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap_node.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@
393393
}
394394

395395
function isDebugBreak() {
396-
return process.execArgv.some((arg) => {
397-
return arg.match(/^--debug-brk(=[0-9]*)?$/);
398-
});
396+
return process.execArgv.some((arg) => /^--debug-brk(=[0-9]+)?$/.test(arg));
399397
}
400398

401399
function run(entryFunction) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.