export class PlatformUtil { public static isMobile ( ) { if ( typeof window === 'object' ) { return /(mobile)/i . test ( navigator . userAgent ) ; } return false ; } public static isAndroid ( ) { if ( typeof window === 'object' ) { return /(android)/i . test ( navigator . userAgent ) ; } return false ; } public static isIOS ( ) { if ( typeof window === 'object' ) { return /(iphone|ipad|ipod)/i . test ( navigator . userAgent ) ; } return false ; } public static isIPad ( ) { if ( typeof window === 'object' ) { return /(ipad)/i . test ( navigator . userAgent ) ; } return false ; } public static isMac ( ) { if ( typeof window === 'object' ) { return ! this . isMobile ( ) && /Mac OS X/i . test ( navigator . userAgent ) ; } return false ; } public static isFireFox ( ) { if ( typeof window === 'object' ) { return /firefox/i . test ( navigator . userAgent ) ; } return false ; } }