browserName: Unknown
userAgent: Unknown
A utility function to get the browser name and user agent string.
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.