npm.io
1.0.2 • Published 4 years ago

detect-browser-platform

Licence
ISC
Version
1.0.2
Deps
0
Size
10 kB
Vulns
0
Weekly
0

Welcome

This module is intended to detect information about Browser brand and version, Operating System and Platform. The detection logic is based on checking browser specific features together with User agent information.

How to install

npm i detect-browser-platform

How to use it

import { getEnvironmentInformation } from  'detect-browser-platform';

const { browserInfo: { brand, version } } = getEnvironmentInformation();
console.log(`Browser name: ${brand}`);
console.log(`Browser version: ${version}`);

Working at this moment:

  • Google Chrome
  • Mozilla Firefox
  • Opera
  • Microsoft Edge (Chromium)
  • Microsoft Edge
  • Apple Safari
  • Internet Explorer

Keywords