New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 0.3.0 to 0.4.0

5

index.js

@@ -11,3 +11,3 @@ /* globals navigator*/

var match = ua.match(/(opera|chrome|safari|firefox|msie|edge|trident(?=\/))\/?\s*(\d+)/i) || [];
var match = ua.match(/(opera|chrome|safari|firefox|edge|trident(?=\/))\/?\s*(\d+)/i) || [];

@@ -32,2 +32,5 @@ if (ua.indexOf('Win') !== -1) {

}
if (ua.indexOf('Windows Phone') !== -1) {
os = 'Windows Phone';
}

@@ -34,0 +37,0 @@ if (/trident/i.test(match[1])) {

2

package.json
{
"name": "browser-info",
"version": "0.3.0",
"version": "0.4.0",
"description": "Get browser info",

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

@@ -49,5 +49,15 @@ 'use strict';

should(info().name).equal('IEMobile');
should(info().os).equal('Windows Phone');
should(info().name).equal('IE');
done();
});
it('should detect IE', function(done) {
GLOBAL.navigator = {
userAgent: 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'
};
should(info().name).equal('IE');
done();
});
});
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