]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
refactor(shared): use Array literal instead of split for global whitelist Set creatio...
author蓝色的秋风 <461249104@qq.com>
Wed, 9 Oct 2019 15:28:52 +0000 (23:28 +0800)
committerEvan You <yyx990803@gmail.com>
Wed, 9 Oct 2019 15:28:52 +0000 (11:28 -0400)
packages/shared/src/globalsWhitelist.ts

index 97e2583884c1c22d138d89e86e4027d37e1d713a..c6f69bddffb043469c1c1df343c0660d5d8ae682 100644 (file)
@@ -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'
+  ]
 )