New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ng-device-detector

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-device-detector - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

0

bower.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ var gulp = require('gulp');

@@ -0,0 +0,0 @@ module.exports = function (config) {

@@ -0,0 +0,0 @@ The MIT License (MIT)

28

ng-device-detector.js

@@ -93,3 +93,3 @@ (function (angular) {

OPERA: /Opera\b/,
IE: /\bMSIE\b/,
IE: {or: [/\bMSIE\b/, /\bTrident\b/]},
PS4: /\bMozilla\/5.0 \(PlayStation 4\b/,

@@ -132,3 +132,3 @@ VITA: /\bMozilla\/5.0 \(Play(S|s)tation Vita\b/

OPERA:/\bVersion\/([\d\.]+)\b/,
IE:/\bMSIE ([\d\.]+\w?)\b/
IE:[/\bMSIE ([\d\.]+\w?)\b/,/\brv:([\d\.]+\w?)\b/]
};

@@ -163,2 +163,16 @@

function exec(string, regex) {
if (regex instanceof RegExp) {
return regex.exec(string);
}
else if (regex && Array.isArray(regex)) {
return regex.reduce(function (res,item) {
return (!!res)?res:exec(string, item);
},null);
}
else {
return null;
}
}
var ua = $window.navigator.userAgent;

@@ -254,10 +268,8 @@

deviceInfo.browser_version = "0"
deviceInfo.browser_version = "0";
if (deviceInfo.browser !== BROWSERS.UNKNOWN) {
var re = BROWSER_VERSIONS_RE[deviceInfo.browser];
if (!!re) {
var exec = re.exec(ua);
if (!!exec) {
deviceInfo.browser_version = exec[1];
}
var res = exec(ua,re);
if (!!res) {
deviceInfo.browser_version = res[1];
}

@@ -264,0 +276,0 @@ }

{
"name": "ng-device-detector",
"version": "1.1.1",
"version": "1.1.2",
"devDependencies": {

@@ -5,0 +5,0 @@ "karma": "*",

@@ -0,0 +0,0 @@ #ng-device-detector

@@ -0,0 +0,0 @@ describe("detectUtils", function () {

@@ -181,3 +181,9 @@ describe("ng-device-detector", function () {

"windows", "windows-nt-4-0", "ie", "11", "unknown", false, false, true);
// Issue 21
describeUserAgent("Mozilla/5.0 (Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko",
"windows", "windows-8-1", "ie", "11.0", "unknown", false, false, true);
describeUserAgent("Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; rv:11.0) like Gecko",
"windows", "windows-7", "ie", "11.0", "unknown", false, false, true);
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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