Socket
Socket
Sign inDemoInstall

detect-browser

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-browser - npm Package Compare versions

Comparing version 4.5.1 to 4.6.0

2

index.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc