Skip to content

Commit

Permalink
lib: add RegExp primordials
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Sebastien-Ahkrin authored and MylesBorins committed Jan 16, 2020
1 parent bdaac04 commit 53e73fc
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ rules:
message: "Use `const { Promise } = primordials;` instead of the global."
- name: Reflect
message: "Use `const { Reflect } = primordials;` instead of the global."
- name: RegExp
message: "Use `const { RegExp } = primordials;` instead of the global."
- name: Set
message: "Use `const { Set } = primordials;` instead of the global."
- name: Symbol
Expand Down
1 change: 1 addition & 0 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const {
ObjectAssign,
ObjectDefineProperty,
ObjectSetPrototypeOf,
RegExp,
Symbol,
SymbolFor,
} = primordials;
Expand Down
1 change: 1 addition & 0 deletions lib/internal/net.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const {
RegExp,
Symbol,
} = primordials;

Expand Down
1 change: 1 addition & 0 deletions lib/internal/policy/sri.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const {
ObjectDefineProperty,
ObjectFreeze,
ObjectSeal,
RegExp,
RegExpPrototypeExec,
RegExpPrototypeTest,
StringPrototypeSlice,
Expand Down
1 change: 1 addition & 0 deletions lib/internal/readline/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const {
Boolean,
NumberIsInteger,
RegExp,
} = primordials;

// Regex used for ansi escape code splitting
Expand Down
4 changes: 4 additions & 0 deletions lib/internal/util/debuglog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
'use strict';

const {
RegExp,
} = primordials;

const { inspect, format, formatWithOptions } = require('internal/util/inspect');

// `debugs` is deliberately initialized to undefined so any call to
Expand Down
1 change: 1 addition & 0 deletions lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const {
ObjectPrototypeHasOwnProperty,
ObjectPrototypePropertyIsEnumerable,
ObjectSeal,
RegExp,
RegExpPrototypeToString,
Set,
SetPrototype,
Expand Down
1 change: 1 addition & 0 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const {
ObjectSetPrototypeOf,
Promise,
PromiseRace,
RegExp,
Set,
Symbol,
WeakSet,
Expand Down

0 comments on commit 53e73fc

Please sign in to comment.