UNPKG

708 BJavaScriptView Raw
1/**
2 * IE浏览器的渲染引擎版本号
3 * 注意:此属性与浏览器版本号不同,IE的渲染引擎版本号是可以通过HTML header或手动设置去更改的
4 * @type {Number} 6 ~ 11
5 */
6export var ieVersion = typeof document !== 'undefined' ? document.documentMode : undefined;
7
8/**
9 * 判断是否是生产环境
10 * @type {Boolean}
11 */
12export var isProduction = function isProduction() {
13 var PRODUCTION_ENV = 'production';
14 var result = false;
15 try {
16 if (process.env.NODE_ENV === PRODUCTION_ENV) {
17 result = true;
18 }
19 } catch (err) {
20 //
21 }
22
23 return result;
24};
25
26export default {
27 ieVersion: ieVersion,
28 isProduction: isProduction
29};
\No newline at end of file