mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
1 parent
a91a824108
commit
bc4cbe3f50
7 files changed
+9
No files matched your search
@@ -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
|
||||
|
||||
@@ -25,6 +25,7 @@ const {
|
||||
ObjectAssign,
|
||||
ObjectDefineProperty,
|
||||
ObjectSetPrototypeOf,
|
||||
RegExp,
|
||||
Symbol,
|
||||
} = primordials;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const {
|
||||
RegExp,
|
||||
Symbol,
|
||||
} = primordials;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ const {
|
||||
ObjectDefineProperty,
|
||||
ObjectFreeze,
|
||||
ObjectSeal,
|
||||
RegExp,
|
||||
RegExpPrototypeExec,
|
||||
RegExpPrototypeTest,
|
||||
StringPrototypeSlice,
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
const { format } = require('internal/util/inspect');
|
||||
|
||||
const { RegExp } = primordials;
|
||||
|
||||
// `debugs` is deliberately initialized to undefined so any call to
|
||||
// debuglog() before initializeDebugEnv() is called will throw.
|
||||
let debugs;
|
||||
|
||||
@@ -35,6 +35,7 @@ const {
|
||||
ObjectPrototypeHasOwnProperty,
|
||||
ObjectPrototypePropertyIsEnumerable,
|
||||
ObjectSeal,
|
||||
RegExp,
|
||||
RegExpPrototypeToString,
|
||||
Set,
|
||||
SetPrototype,
|
||||
|
||||
@@ -58,6 +58,7 @@ const {
|
||||
ObjectSetPrototypeOf,
|
||||
Promise,
|
||||
PromiseRace,
|
||||
RegExp,
|
||||
Set,
|
||||
Symbol,
|
||||
WeakMap,
|
||||
|
||||
Reference in new issue
Block a user