Skip to content

shalanah/inapp-spy

Repository files navigation

InApp Spy 🔎

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

Installation

yarn add inapp-spy

Code Example

import InAppSpy from "inapp-spy";

const { isInApp, appName } = InAppSpy();

API Reference

Return properties

isInApp

Detected in-app browser

boolean

appKey

Recognized app key with in-app browser

"messenger" |
  "facebook" |
  "twitter" |
  "wechat" |
  "instagram" |
  "tiktok" |
  "snapchat" |
  "line" |
  undefined;

Can be undefined if isInApp: true.

appName

Pretty printed app name ie: tiktok is TikTok. Subject to change,

appKey is recommended for programmatic use.

string

ua

The user agent passed in or figured out by InAppSpy() function

string

Parameters (optional)

{
  ua?: string;
}

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.