@dvlden/asb-detect
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Android Stock-Browser Detect

GitHub package.json version npm bundle size (scoped)

ASB-Detect has only one purpose – to detect any Android Stock-Browser and redirect visitor to download Google Chrome from the Android Market directly. There's simply no reason why anyone would use Stock-Browser that comes with older Android's, if there's Google Chrome for those devices. Google Chrome is default browser on newer Android devices...


Installation

Use your favourite package manager... In my case that's pnpm.

pnpm i @dvlden/asb-detect

Usage

Browser

import { asb } from '@dvlden/asb-detect'

asb.detect()

Node

const { asb } = require('@dvlden/asb-detect')

asb.detect()

Options

You can write your own logic for detection with access to isStock property.

if (asb.isStock) {
  // do something...
}

You can pass an optional message to the detect() function. If you want to omit the default one.

asb.detect('Your custom message, instead?')

Package Sidebar

Install

npm i @dvlden/asb-detect

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

6.78 kB

Total Files

8

Last publish

Collaborators

  • dvlden