diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-11-30 15:33:18 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-12-13 21:57:31 +0300 |
commit | 28ee032fca302b09f444c5588d50dd3be007ad2e (patch) | |
tree | 39b6ae369872d13fe18f89ebf7a72de953b96ef8 /lib/internal/util | |
parent | 654d22ccf40ab3b803baa7c43dafa46875c20812 (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.js | 2 |
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 |