UNPKG

react-input-mask-plus

Version:
37 lines (32 loc) 1.13 kB
"use strict"; exports.__esModule = true; exports.isAndroidBrowser = isAndroidBrowser; exports.isWindowsPhoneBrowser = isWindowsPhoneBrowser; exports.isAndroidFirefox = isAndroidFirefox; exports.isIOS = isIOS; function isAndroidBrowser() { var windows = new RegExp('windows', 'i'); var firefox = new RegExp('firefox', 'i'); var android = new RegExp('android', 'i'); var ua = navigator.userAgent; return !windows.test(ua) && !firefox.test(ua) && android.test(ua); } function isWindowsPhoneBrowser() { var windows = new RegExp('windows', 'i'); var phone = new RegExp('phone', 'i'); var ua = navigator.userAgent; return windows.test(ua) && phone.test(ua); } function isAndroidFirefox() { var windows = new RegExp('windows', 'i'); var firefox = new RegExp('firefox', 'i'); var android = new RegExp('android', 'i'); var ua = navigator.userAgent; return !windows.test(ua) && firefox.test(ua) && android.test(ua); } function isIOS() { var windows = new RegExp('windows', 'i'); var ios = new RegExp('(ipod|iphone|ipad)', 'i'); var ua = navigator.userAgent; return !windows.test(ua) && ios.test(ua); }