Socket
Socket
Sign inDemoInstall

device-detector-node

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

device-detector-node - npm Package Compare versions

Comparing version 0.1.35 to 0.1.36

10

index.js

@@ -66,2 +66,5 @@ module.exports = DeviceDetector;

path = this.base_path + '/device/mobiles.yml';
this.collections.device.mobiles = YAML.load(path);
path = this.base_path + '/device/cameras.yml';

@@ -82,4 +85,2 @@ this.collections.device.cameras = YAML.load(path);

path = this.base_path + '/device/mobiles.yml';
this.collections.device.mobiles = YAML.load(path);

@@ -217,3 +218,2 @@ // Bots Collections

}
if(collection[key].models){

@@ -223,3 +223,6 @@ for(var i= 0, l = collection[key]['models'].length; i < l; i++){

var model_preg = getBaseRegExp(data.regex);
console.log(model_preg);
if(model_match = model_preg.exec(user_agent)){
console.log(data.model);
if(data.model){

@@ -333,2 +336,3 @@ device.model = (this.buildModel(data.model,model_match)).replace(/ +$/, "");

if( result[i][j] == '' && uaparser[i] && uaparser[i][j] && uaparser[i][j] != ''){
console.log("Changeee: "+uaparser[i][j]);
result[i][j] = uaparser[i][j];

@@ -335,0 +339,0 @@ }

{
"author": "MiGatoSeneca",
"name": "device-detector-node",
"version": "0.1.35",
"version": "0.1.36",
"description": "Port from Matomo Device Detector, package to parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.",

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

@@ -10,3 +10,4 @@ const DeviceDetector = require('../index');

"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1",
"Mozilla/5.0 (Linux; Android 7.1.1; SM-N950F Build/NMF26X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36"
"Mozilla/5.0 (Linux; Android 7.1.1; SM-N950F Build/NMF26X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36",
"Mozilla/5.0 (Linux; Android 6.0; SAMSUNG SM-G935F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36"
];

@@ -13,0 +14,0 @@ for(var i= 0, l = user_agents.length; i < l; i++){

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