browser-agent
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Check Operating System, Browser Type and Version

Browser checks:

  • Chrome
  • Edge
  • Firefox
  • IE
  • Safari

Operating System checks:

  • Windows
  • Mac OS
  • Ubuntu
  • Fedora
  • Red Hat
  • Linux Mint
  • CentOS
  • Debian
  • Linux
  • Android
  • iOS
  • iPadOS
  • Unix

How to use

import { detectMac } from 'browser-agent'

const shortcutToolTipLabel = (event: Keyboard) => {
  const alt = `${detectMac(userAgent) ? '⌥' : 'alt'}`
  const shift = `${detectMac(userAgent) ? '⇧' : 'shift'}`
  return `${alt} + ${shift} + T`
}
const browserAgent = require('browser-agent')
const { detectMac } = browserAgent

const shortcutToolTipLabel = (event) => {
  const alt = `${detectMac(userAgent) ? '⌥' : 'alt'}`
  const shift = `${detectMac(userAgent) ? '⇧' : 'shift'}`
  return `${alt} + ${shift} + T`
}

Browser Agent packages notice

The npm packages:

  • browser-agent
  • browser-agent-collection

Have the same version to grantee compatibility with each other.

How to contribute

Before starting, please read our Code of Conduct and Contributing Guidelines for detailed information and instructions on contributing to this repository.

Readme

Keywords

none

Package Sidebar

Install

npm i browser-agent

Weekly Downloads

1

Version

3.0.1

License

MIT

Unpacked Size

62.7 kB

Total Files

49

Last publish

Collaborators

  • tessavwalstijn