detect-browser
Advanced tools
Comparing version 4.5.1 to 4.6.0
@@ -27,3 +27,3 @@ /// <reference types="node" /> | ||
declare type OperatingSystem = 'iOS' | 'Android OS' | 'BlackBerry OS' | 'Windows Mobile' | 'Amazon OS' | 'Windows 3.11' | 'Windows 95' | 'Windows 98' | 'Windows 2000' | 'Windows XP' | 'Windows Server 2003' | 'Windows Vista' | 'Windows 7' | 'Windows 8' | 'Windows 8.1' | 'Windows 10' | 'Windows ME' | 'Open BSD' | 'Sun OS' | 'Linux' | 'Mac OS' | 'QNX' | 'BeOS' | 'OS/2' | 'Chrome OS' | 'Search Bot'; | ||
export declare function detect(): BrowserInfo | BotInfo | NodeInfo | null; | ||
export declare function detect(userAgent?: string): BrowserInfo | BotInfo | NodeInfo | null; | ||
export declare function parseUserAgent(ua: string): BrowserInfo | BotInfo | null; | ||
@@ -30,0 +30,0 @@ export declare function detectOS(ua: string): OperatingSystem | null; |
@@ -96,3 +96,6 @@ "use strict"; | ||
]; | ||
function detect() { | ||
function detect(userAgent) { | ||
if (!!userAgent) { | ||
return parseUserAgent(userAgent); | ||
} | ||
if (typeof navigator !== 'undefined') { | ||
@@ -99,0 +102,0 @@ return parseUserAgent(navigator.userAgent); |
{ | ||
"name": "detect-browser", | ||
"version": "4.5.1", | ||
"version": "4.6.0", | ||
"description": "Unpack a browser type and version from the useragent string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194
14589
5