mazey
    Preparing search index...

    Function getBrowserInfo

    • Return detailed information about the current browser.

      Usage:

      import { getBrowserInfo } from "mazey";

      const ret = getBrowserInfo();
      console.log(ret);

      Output:

      {"engine":"webkit","engineVs":"537.36","platform":"desktop","supporter":"chrome","supporterVs":"85.0.4183.121","system":"windows","systemVs":"10"}
      

      Results:

      Attribute Description Type Values
      system System string android, ios, windows, macos, linux
      systemVs System version string Windows: 2000, xp, 2003, vista, 7, 8, 8.1, 10 macOS: ...
      platform Platform string desktop, mobile
      engine Engine string webkit, gecko, presto, trident
      engineVs Engine version string -
      supporter Supporter string edge, opera, chrome, safari, firefox, iexplore
      supporterVs Supporter version string -
      shell Shell string (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili
      shellVs Shell version string (Optional) 20/...
      appleType Apple device type string (Optional) ipad, iphone, ipod, iwatch

      Example: Determine the environment of the mobile QQ.

      const { system, shell } = getBrowserInfo();
      const isMobileQQ = ["android", "ios"].includes(system) && ["qq_browser", "qq_app"].includes(shell);

      Returns BrowserInfo

      Browser information

      Browser only.