npm

detect-inapp
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/detect-inapp package

1.4.0 • Public • Published

Detect InApp

detect browser or in-app information for mobile

Build Status codecov npm downloads js-standard-style Commitizen friendly semantic-release

Code Example

import InApp from 'detect-inapp';

const inapp = new InApp(navigator.userAgent || navigator.vendor || window.opera);

Installation

yarn add detect-inapp

API Reference

  • 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')

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i detect-inapp

Weekly Downloads

2,938

Version

1.4.0

License

MIT

Unpacked Size

4.87 kB

Total Files

3

Last publish

Collaborators

  • yutin1987