Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-11-30 15:33:18 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-13 21:57:31 +0300
commit28ee032fca302b09f444c5588d50dd3be007ad2e (patch)
tree39b6ae369872d13fe18f89ebf7a72de953b96ef8 /lib/internal/util
parent654d22ccf40ab3b803baa7c43dafa46875c20812 (diff)
util: fix built-in detection
This makes sure that the regular expression matches all built-in objects properly. So far a couple where missed. PR-URL: https://github.com/nodejs/node/pull/30768 Fixes: https://github.com/nodejs/node/issues/30183 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/internal/util')
-rw-r--r--lib/internal/util/inspect.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js
index a4a9a05ece9..85ef59c87d4 100644
--- a/lib/internal/util/inspect.js
+++ b/lib/internal/util/inspect.js
@@ -116,7 +116,7 @@ const { NativeModule } = require('internal/bootstrap/loaders');
let hexSlice;
const builtInObjects = new Set(
- ObjectGetOwnPropertyNames(global).filter((e) => /^([A-Z][a-z]+)+$/.test(e))
+ ObjectGetOwnPropertyNames(global).filter((e) => /^[A-Z][a-zA-Z0-9]+$/.test(e))
);
// These options must stay in sync with `getUserOptions`. So if any option will