duct-get-browser-info
v1.0.0
Published
A utility function to get the browser name and user agent string.
Downloads
2
Readme
using duct-get-browser-info
A utility function to get the browser name and user agent string.
Demo
https://codeduct.com/duct-get-browser-info
duct-get-browser-info setup
npm
npm i duct-get-browser-info
Add the duct-get-browser-info package in the component you want to use after installation.
import getBrowserInfo from 'duct-get-browser-info'
ready to use
const browserInfo = getBrowserInfo();
console.log(browserInfo.browserName); //Chrome
console.log(browserInfo.userAgent); //Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ....
Returns the personal browser name of browserName. userAgent returns the browser's user agent string.