lib: add RegExp primordials
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
b8922e8924
commit
a494d12723
@ -35,6 +35,8 @@ rules:
|
|||||||
message: "Use `const { Promise } = primordials;` instead of the global."
|
message: "Use `const { Promise } = primordials;` instead of the global."
|
||||||
- name: Reflect
|
- name: Reflect
|
||||||
message: "Use `const { Reflect } = primordials;` instead of the global."
|
message: "Use `const { Reflect } = primordials;` instead of the global."
|
||||||
|
- name: RegExp
|
||||||
|
message: "Use `const { RegExp } = primordials;` instead of the global."
|
||||||
- name: Set
|
- name: Set
|
||||||
message: "Use `const { Set } = primordials;` instead of the global."
|
message: "Use `const { Set } = primordials;` instead of the global."
|
||||||
- name: Symbol
|
- name: Symbol
|
||||||
|
@ -25,6 +25,7 @@ const {
|
|||||||
ObjectAssign,
|
ObjectAssign,
|
||||||
ObjectDefineProperty,
|
ObjectDefineProperty,
|
||||||
ObjectSetPrototypeOf,
|
ObjectSetPrototypeOf,
|
||||||
|
RegExp,
|
||||||
Symbol,
|
Symbol,
|
||||||
SymbolFor,
|
SymbolFor,
|
||||||
} = primordials;
|
} = primordials;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
RegExp,
|
||||||
Symbol,
|
Symbol,
|
||||||
} = primordials;
|
} = primordials;
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ const {
|
|||||||
ObjectDefineProperty,
|
ObjectDefineProperty,
|
||||||
ObjectFreeze,
|
ObjectFreeze,
|
||||||
ObjectSeal,
|
ObjectSeal,
|
||||||
|
RegExp,
|
||||||
RegExpPrototypeExec,
|
RegExpPrototypeExec,
|
||||||
RegExpPrototypeTest,
|
RegExpPrototypeTest,
|
||||||
StringPrototypeSlice,
|
StringPrototypeSlice,
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
const {
|
const {
|
||||||
Boolean,
|
Boolean,
|
||||||
NumberIsInteger,
|
NumberIsInteger,
|
||||||
|
RegExp,
|
||||||
} = primordials;
|
} = primordials;
|
||||||
|
|
||||||
// Regex used for ansi escape code splitting
|
// Regex used for ansi escape code splitting
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
const {
|
||||||
|
RegExp,
|
||||||
|
} = primordials;
|
||||||
|
|
||||||
const { inspect, format, formatWithOptions } = require('internal/util/inspect');
|
const { inspect, format, formatWithOptions } = require('internal/util/inspect');
|
||||||
|
|
||||||
// `debugs` is deliberately initialized to undefined so any call to
|
// `debugs` is deliberately initialized to undefined so any call to
|
||||||
|
@ -35,6 +35,7 @@ const {
|
|||||||
ObjectPrototypeHasOwnProperty,
|
ObjectPrototypeHasOwnProperty,
|
||||||
ObjectPrototypePropertyIsEnumerable,
|
ObjectPrototypePropertyIsEnumerable,
|
||||||
ObjectSeal,
|
ObjectSeal,
|
||||||
|
RegExp,
|
||||||
RegExpPrototypeToString,
|
RegExpPrototypeToString,
|
||||||
Set,
|
Set,
|
||||||
SetPrototype,
|
SetPrototype,
|
||||||
|
@ -56,6 +56,7 @@ const {
|
|||||||
ObjectSetPrototypeOf,
|
ObjectSetPrototypeOf,
|
||||||
Promise,
|
Promise,
|
||||||
PromiseRace,
|
PromiseRace,
|
||||||
|
RegExp,
|
||||||
Set,
|
Set,
|
||||||
Symbol,
|
Symbol,
|
||||||
WeakSet,
|
WeakSet,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user