mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 05:29:01 +08:00
11 lines
524 B
TypeScript
11 lines
524 B
TypeScript
/* eslint-disable no-undef */
|
|
// Browser environment sniffing
|
|
export const inBrowser = typeof window !== 'undefined';
|
|
export const UA = inBrowser && window.navigator.userAgent.toLowerCase();
|
|
export const isIE = UA && /msie|trident/.test(UA);
|
|
export const isIE9 = UA && UA.indexOf('msie 9.0') > 0;
|
|
export const isEdge = UA && UA.indexOf('edge/') > 0;
|
|
export const isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
|
|
export const isPhantomJS = UA && /phantomjs/.test(UA);
|
|
export const isFF = UA && UA.match(/firefox\/(\d+)/);
|