populate list of globals from globalThis object

This commit is contained in:
Dmitry Vasilev
2023-01-20 14:36:47 +08:00
parent 5b5938ee61
commit 2cd4f98375

View File

@@ -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))