Skip to content

Commit 53e73fc

Browse files
Sebastien-AhkrinMylesBorins
authored andcommitted
lib: add RegExp primordials
PR-URL: #31208 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent bdaac04 commit 53e73fc

File tree

8 files changed

+12
-0
lines changed

8 files changed

+12
-0
lines changed

lib/.eslintrc.yaml

+2
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

lib/_tls_wrap.js

+1
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;

lib/internal/net.js

+1
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

lib/internal/policy/sri.js

+1
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,

lib/internal/readline/utils.js

+1
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

lib/internal/util/debuglog.js

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

lib/internal/util/inspect.js

+1
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,

lib/repl.js

+1
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)