detect browser or in-app information for mobile
import InApp from 'detect-inapp';
const inapp = new InApp(navigator.userAgent || navigator.vendor || window.opera);
yarn add detect-inapp
-
inapp.isMobile()
-
inapp.isTablet()
-
inapp.isDesktop()
-
inapp.inBot()
-
inapp.isInApp()
-
inapp.isApplePay()
-
inapp.isInstalled('APP_NAME')
-
inapp.os
values: 'android', 'ios', 'windows'
-
inapp.device
-
inapp.browser
values: 'messenger', 'facebook', 'line', 'twitter', 'wechat', 'miui', 'instagram', 'chrome', 'safari', 'ie', 'firefox'
inapp.addMatch('NAME', 'Regex')
MIT License