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 53e73fc

Browse filesBrowse files
Sebastien-AhkrinMylesBorins
authored andcommitted
lib: add RegExp primordials
PR-URL: #31208 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent bdaac04 commit 53e73fc
Copy full SHA for 53e73fc

File tree

Expand file treeCollapse file tree

8 files changed

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

8 files changed

+12
-0
lines changed
Open diff view settings
Collapse file

‎lib/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ rules:
3535
message: "Use `const { Promise } = primordials;` instead of the global."
3636
- name: Reflect
3737
message: "Use `const { Reflect } = primordials;` instead of the global."
38+
- name: RegExp
39+
message: "Use `const { RegExp } = primordials;` instead of the global."
3840
- name: Set
3941
message: "Use `const { Set } = primordials;` instead of the global."
4042
- name: Symbol
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const {
2525
ObjectAssign,
2626
ObjectDefineProperty,
2727
ObjectSetPrototypeOf,
28+
RegExp,
2829
Symbol,
2930
SymbolFor,
3031
} = primordials;
Collapse file

‎lib/internal/net.js‎

Copy file name to clipboardExpand all lines: lib/internal/net.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const {
4+
RegExp,
45
Symbol,
56
} = primordials;
67

Collapse file

‎lib/internal/policy/sri.js‎

Copy file name to clipboardExpand all lines: lib/internal/policy/sri.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const {
55
ObjectDefineProperty,
66
ObjectFreeze,
77
ObjectSeal,
8+
RegExp,
89
RegExpPrototypeExec,
910
RegExpPrototypeTest,
1011
StringPrototypeSlice,
Collapse file

‎lib/internal/readline/utils.js‎

Copy file name to clipboardExpand all lines: lib/internal/readline/utils.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
Boolean,
55
NumberIsInteger,
6+
RegExp,
67
} = primordials;
78

89
// Regex used for ansi escape code splitting
Collapse file

‎lib/internal/util/debuglog.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/debuglog.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
'use strict';
22

3+
const {
4+
RegExp,
5+
} = primordials;
6+
37
const { inspect, format, formatWithOptions } = require('internal/util/inspect');
48

59
// `debugs` is deliberately initialized to undefined so any call to
Collapse file

‎lib/internal/util/inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const {
3535
ObjectPrototypeHasOwnProperty,
3636
ObjectPrototypePropertyIsEnumerable,
3737
ObjectSeal,
38+
RegExp,
3839
RegExpPrototypeToString,
3940
Set,
4041
SetPrototype,
Collapse file

‎lib/repl.js‎

Copy file name to clipboardExpand all lines: lib/repl.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const {
5656
ObjectSetPrototypeOf,
5757
Promise,
5858
PromiseRace,
59+
RegExp,
5960
Set,
6061
Symbol,
6162
WeakSet,

0 commit comments

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