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

This commit is contained in:
蓝色的秋风 2019-10-09 23:28:52 +08:00 committed by Evan You
parent f91d335e65
commit f97d6e7d63

View 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'
]
)