Get the user agent to use, respecting the package.json and navigator.userAgent
Install
npm install ergent
Usage
const userAgent = ; userAgent; // In Node.js//=> 'myPackage v1.0.0' userAgent; // In a browser//=> 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36'
API
ergent
Type: string
The user agent to be used.