UNPKG

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