All files / shared/src globalsAllowList.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 0/0
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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