Переглянути джерело

refactor(shared): use Array literal instead of split for global whitelist Set creation (#173)

蓝色的秋风 6 роки тому
батько
коміт
f97d6e7d63
1 змінених файлів з 5 додано та 5 видалено
  1. 5 5
      packages/shared/src/globalsWhitelist.ts

+ 5 - 5
packages/shared/src/globalsWhitelist.ts

@@ -1,7 +1,7 @@
 export const globalsWhitelist = new Set(
-  (
-    'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
-    'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
-    'Object,Boolean,String,RegExp,Map,Set,JSON,Intl'
-  ).split(',')
+  [
+    'Infinity', 'undefined', 'NaN', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'decodeURI',
+    'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'Math', 'Number', 'Date', 'Array',
+    'Object', 'Boolean', 'String', 'RegExp', 'Map', 'Set', 'JSON', 'Intl'
+  ]
 )