duct Get Browser Info

duct Get Browser Info

A utility function to get the browser name and user agent string.

duct-get-browser-info setup

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.