Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

browser-info

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-info - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

48

index.js

@@ -5,2 +5,25 @@ /* globals navigator*/

function getOS(userAgent){
if (userAgent.indexOf('Windows Phone') !== -1) {
return 'Windows Phone';
}
if (userAgent.indexOf('Win') !== -1) {
return 'Windows';
}
if (userAgent.indexOf('Android') !== -1) {
return 'Android';
}
if (userAgent.indexOf('Linux') !== -1) {
return 'Linux';
}
if (userAgent.indexOf('X11') !== -1) {
return 'UNIX';
}
if (/iPad|iPhone|iPod/.test(userAgent)) {
return 'iOS';
}
if (userAgent.indexOf('Mac') !== -1) {
return 'OS X';
}
}

@@ -11,28 +34,5 @@ function info(userAgent){

var os = getOS(ua);
var match = ua.match(/(opera|coast|chrome|safari|firefox|edge|trident(?=\/))\/?\s*?(\S+)/i) || [];
var os = (function (match){
if (ua.indexOf('Windows Phone') !== -1) {
return 'Windows Phone';
}
if (ua.indexOf('Win') !== -1) {
return 'Windows';
}
if (ua.indexOf('Android') !== -1) {
return 'Android';
}
if (ua.indexOf('Linux') !== -1) {
return 'Linux';
}
if (ua.indexOf('X11') !== -1) {
return 'UNIX';
}
if (/iPad|iPhone|iPod/.test(ua)) {
return 'iOS';
}
if (ua.indexOf('Mac') !== -1) {
return 'OS X';
}
})(match);
tem = ua.match(/\bIEMobile\/(\S+[0-9])/);

@@ -39,0 +39,0 @@ if (tem !== null) {

{
"name": "browser-info",
"version": "1.1.0",
"version": "1.1.1",
"description": "Get browser info",

@@ -5,0 +5,0 @@ "author": "Steve Lacy <me@slacy.me> (http://slacy.me)",

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