globalsAllowList.ts 466 B

1234567891011
  1. import { makeMap } from './makeMap'
  2. const GLOBALS_ALLOWED =
  3. 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
  4. 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
  5. 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error'
  6. export const isGloballyAllowed = /*#__PURE__*/ makeMap(GLOBALS_ALLOWED)
  7. /** @deprecated use `isGloballyAllowed` instead */
  8. export const isGloballyWhitelisted = isGloballyAllowed