Repository URL to install this package:
|
Version:
3.0.2 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exotic_1 = require("exotic");
function isTouchDevice() {
return exotic_1.isObj(document.documentElement) && 'ontouchstart' in document.documentElement;
}
exports.isTouchDevice = isTouchDevice;
/**
* @see https://stackoverflow.com/questions/33152523/how-do-i-detect-ie-and-edge-browser?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
*/
function isEdgeOrInternetExplorer() {
if (typeof window === 'object' && typeof document === 'object' && typeof navigator === 'object') {
return document.documentMode || /Edge/.test(navigator.userAgent);
}
else if (typeof global === 'object') {
if (exotic_1.isObj(global.oneUrl)) {
return /Edge/.test(global.oneUrl.userAgent);
}
else {
console.warn('application: isEdgeOrInternetExplorer is triggered before global.oneUrl');
return false;
}
}
else {
console.warn('could not determine isEdgeOrInternetExplorer');
return false;
}
}
exports.isEdgeOrInternetExplorer = isEdgeOrInternetExplorer;
//# sourceMappingURL=deps.js.map