You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
524 B
11 lines
524 B
5 years ago
|
/* eslint-disable no-undef */
|
||
5 years ago
|
// Browser environment sniffing
|
||
6 years ago
|
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;
|
||
5 years ago
|
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+)/);
|