3.0.0 • Published 3 months ago

inapp-spy v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

InAppSpy 🔎

Detect in-app browsers - fork of detect-inapp with API modifications + additions

Installation

yarn add inapp-spy
npm install inapp-spy

Code Example

import InAppSpy from "inapp-spy";

const { isInApp, appKey, appName } = InAppSpy();

API Reference

Return properties

{
  // Detected in-app browser
  isInApp: boolean;

  // Recognized app with in-app browser
  appKey: "messenger" |
    "facebook" |
    "twitter" |
    "wechat" |
    "instagram" |
    "tiktok" |
    "snapchat" |
    "line" |
    undefined; // can be undefined if `isInApp: true`

  // Pretty printed app name
  // - ie `appKey: 'tiktok', appName: 'TikTok'`
  // - Subject to change, use `appKey` for programmatic use
  appName: string;

  ua: string; // The user agent passed in or figured out by `InAppSpy()` function
}

Parameters (optional)

InAppSpy({
  ua?: string; // not required
})

License

MIT License

Related

  • Bowser - Browser + OS detection
  • InAppDebugger - Easily debug in-app browsers. Uses both bowser and inapp-spy libraries.

Thanks

inapp-spy is a fork of detect-inapp with modifications. This wouldn't exist without the original work of the detect-inapp contributors.

3.0.0

3 months ago

2.1.1

3 months ago

2.1.0

3 months ago

2.0.3

3 months ago

2.0.4

3 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

2.0.1

3 months ago

1.0.4

3 months ago

2.0.0

3 months ago

1.0.3

3 months ago

1.0.0

3 months ago