New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@akkadu/browser-info

Package Overview
Dependencies
Maintainers
6
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akkadu/browser-info

This modules purpose is to help provide specific browser information for us to use. It has two main purposes

  • 4.1.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
6
Created
Source

Description

This modules purpose is to help provide specific browser information for us to use. It has two main purposes

Detect browser env

This module returns browser information based upon a widely used ua parser ua-parser-js

Some Chinese browsers are not supported by the module, so they are filled in manually for now. These include

  • Wechat browser
  • Huawei browser or Huawei phone
  • Sogou browser

The information returned includes

  • browserName:string
  • browserVersion:number
  • osName:string
  • osVersion:number
  • isMobile:boolean
  • isSafari:boolean
  • isIos:boolean
  • isMac:boolean

Detect if browser is online

This is a non trivial task, because window.online methods behave differently on Firefox and Chrome. In addition other browsers do not implement said api at all. Hence the only reliable way to detect if a browser is online or offline is to query a real life object, which in our case is a tiny s3 object served through our CDN.

FAQs

Package last updated on 20 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc