Socket
Socket
Sign inDemoInstall

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.8.0 to 1.9.0

1

lib/detectBrowser.js

@@ -8,2 +8,3 @@ module.exports = function detectBrowser(userAgentString) {

[ 'vivaldi', /Vivaldi\/([0-9\.]+)/ ],
[ 'kakaotalk', /KAKAOTALK\s([0-9\.]+)/ ],
[ 'chrome', /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/ ],

@@ -10,0 +11,0 @@ [ 'crios', /CriOS\/([0-9\.]+)(:?\s|$)/ ],

2

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -175,2 +175,16 @@ var test = require('tape');

test('detects Kakaotalk Browser', function(t) {
assertAgentString(t,
'Netscape 5.0 (iPhone; CPU iPhone OS 10_3 1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 KAKAOTALK 6.2.2',
{ name: 'kakaotalk', version: '6.2.2' }
);
assertAgentString(t,
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 1 like Mac OS X) AppleWebKit/ 603.1.30 (KHTML, like Gecko) Mobile/ 14E304 KAKAOTALK 6.2.2',
{ name: 'kakaotalk', version: '6.2.2' }
);
t.end();
});
test('handles no browser', function(t) {

@@ -177,0 +191,0 @@ assertAgentString(t,

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