UNPKG

react-input-mask-plus

Version:
26 lines 946 B
export 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); } export 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); } export 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); } export 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); }