From 07006113affef5864405910d4588835351b2e3c1 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Sat, 30 Nov 2019 13:33:18 +0100 Subject: [PATCH] util: fix built-in detection This makes sure that the regular expression matches all built-in objects properly. So far a couple where missed. --- lib/internal/util/inspect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index dde2066294590b..8cf7edfac6cbf3 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)) ); const inspectDefaultOptions = ObjectSeal({