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 1.1.1 to 1.2.0

7

index.js

@@ -89,2 +89,9 @@ /* globals navigator*/

}
if (match[0] === 'Firefox') {
match[0] = /waterfox/i.test(ua)
? 'Waterfox'
: match[0];
}
return {

@@ -91,0 +98,0 @@ name: match[0],

2

package.json
{
"name": "browser-info",
"version": "1.1.1",
"version": "1.2.0",
"description": "Get browser info",

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

@@ -1,2 +0,2 @@

#browser-info
# browser-info
[![Build Status](https://travis-ci.org/stevelacy/browser-info.png?branch=master)](https://travis-ci.org/stevelacy/browser-info)

@@ -3,0 +3,0 @@ [![NPM version](https://badge.fury.io/js/browser-info.png)](http://badge.fury.io/js/browser-info)

@@ -78,2 +78,26 @@ 'use strict';

it('should detect Firefox', function(done) {
global.navigator = {
userAgent: 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0'
};
should(info().name).equal('Firefox');
should(info().os).equal('Linux');
should(info().version).equal('57');
should(info().fullVersion).equal('57.0');
done();
});
it('should detect Waterfox', function(done) {
global.navigator = {
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x86; rv:40.0) Gecko/20100101 Firefox/40.0.2 Waterfox/40.0.2'
};
should(info().name).equal('Waterfox');
should(info().os).equal('Windows');
should(info().version).equal('40');
should(info().fullVersion).equal('40.0.2');
done();
});
it('should detect OperaCoast', function(done) {

@@ -80,0 +104,0 @@ global.navigator = {

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