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

detect-browser

Package Overview
Dependencies
Maintainers
2
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 1.6.2 to 1.7.0

8

browser.js
var detectBrowser = require('./lib/detectBrowser');
module.exports = detectBrowser(navigator.userAgent);
var agent;
if (typeof navigator !== 'undefined' && navigator) {
agent = navigator.userAgent;
}
module.exports = detectBrowser(agent);
module.exports = function detectBrowser(userAgentString) {
if (!userAgentString) return null;
var browsers = [

@@ -3,0 +5,0 @@ [ 'edge', /Edge\/([0-9\._]+)/ ],

4

package.json
{
"name": "detect-browser",
"version": "1.6.2",
"version": "1.7.0",
"description": "Unpack a browser type and version from the useragent string",

@@ -32,2 +32,2 @@ "main": "index.js",

}
}
}

@@ -146,1 +146,10 @@ var test = require('tape');

});
test('handles no browser', function(t) {
assertAgentString(t,
null,
null
);
t.end();
});
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