From 2cd4f983755e50573ede7c2644359bc6f79064f2 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilev Date: Fri, 20 Jan 2023 14:36:47 +0800 Subject: [PATCH] populate list of globals from globalThis object --- src/globals.js | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/src/globals.js b/src/globals.js index c9b2c2e..74d57be 100644 --- a/src/globals.js +++ b/src/globals.js @@ -1,40 +1 @@ -export const globals = new Set([ - 'globalThis', - 'Promise', - // TODO Symbol - 'URL', - 'Set', - 'Map', - "Infinity", - "NaN", - "undefined", - "Function", - "Object", - "Array", - "Number", - "String", - "Boolean", - "Date", - "Math", - "RegExp", - "JSON", - "Error", - "EvalError", - "RangeError", - "ReferenceError", - "SyntaxError", - "TypeError", - "URIError", - "isNaN", - "isFinite", - "parseFloat", - "parseInt", - "eval", - "escape", - "unescape", - "decodeURI", - "decodeURIComponent", - "encodeURI", - "encodeURIComponent", - "console", -]) +export const globals = new Set(Object.getOwnPropertyNames(globalThis))