UNPKG

736 BJavaScriptView Raw
1"use strict";
2var mobileType = {
3 Android: function () {
4 return (/Android/i).test(navigator.userAgent);
5 },
6 BlackBerry: function () {
7 return (/BlackBerry/i).test(navigator.userAgent);
8 },
9 iOS: function () {
10 return (/iPhone|iPad|iPod/i).test(navigator.userAgent);
11 },
12 Opera: function () {
13 return (/Opera Mini/i).test(navigator.userAgent);
14 },
15 Windows: function () {
16 return (/IEMobile/i).test(navigator.userAgent);
17 },
18 any: function () {
19 return (this.Android() || this.BlackBerry() || this.iOS() || this.Opera() || this.Windows());
20 }
21};
22var isMobile = mobileType.any.bind(mobileType);
23module.exports = isMobile;
24//# sourceMappingURL=isMobile.js.map
\No newline at end of file