detectBrowser()
function detectBrowser(): BrowserName;
Detects the current browser based on the user agent string.
Returns
The detected browser name as a BrowserName type.
Example
const browser = detectBrowser();
console.log(`Running in browser: ${browser}`);