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

woothee

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

woothee - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

woothee/.git

2

lib/dataset.js

@@ -37,3 +37,3 @@ var KEY_LABEL = exports.KEY_LABEL = 'label',

var DATASET = {};
// GENERATED from dataset.yaml at Sun Jul 22 01:16:13 JST 2018 by tell_k
// GENERATED from dataset.yaml at Thu Feb 21 18:26:55 JST 2019 by tagomoris
var obj;

@@ -40,0 +40,0 @@ obj = {label:'MSIE', name:'Internet Explorer', type:'browser'};

{
"name": "woothee",
"version": "1.8.0",
"version": "1.8.1",
"description": "User-Agent string parser (js implementation)",
"main": "./release/woothee",
"devDependencies": {
"mocha": "~3.5.3",
"chai": ">= 1.3.0",
"js-yaml": ">= 1.0.3",
"mocha": "^6.0.0",
"should": "~1.2.2"

@@ -20,3 +20,3 @@ },

"author": "tagomoris",
"license": "Apache v2"
"license": "Apache-2.0"
}

@@ -5,6 +5,6 @@ (function (){

// GENERATED from dataset.yaml at Mon Aug 22 20:49:52 JST 2016 by tagomoris
// GENERATED from dataset.yaml at Thu Feb 21 18:26:55 JST 2019 by tagomoris
// Snapshot from package.json
var package_info = {"name":"woothee","version":"1.5.0","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"mocha":">= 1.7.0","chai":">= 1.3.0","js-yaml":">= 1.0.3","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache v2"};
var package_info = {"name":"woothee","version":"1.8.1","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"chai":">= 1.3.0","js-yaml":">= 1.0.3","mocha":"^6.0.0","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache-2.0"};

@@ -45,3 +45,3 @@ var dataset = {};

var DATASET = {};
// GENERATED from dataset.yaml at Mon Aug 22 20:49:51 JST 2016 by tagomoris
// GENERATED from dataset.yaml at Thu Feb 21 18:26:55 JST 2019 by tagomoris
var obj;

@@ -75,2 +75,5 @@ obj = {label:'MSIE', name:'Internet Explorer', type:'browser'};

DATASET[obj.label] = obj;
obj = {label:'YaBrowser', name:'Yandex Browser', type:'browser'};
obj['vendor'] = 'Yandex';
DATASET[obj.label] = obj;
obj = {label:'Win', name:'Windows UNKNOWN Ver', type:'os'};

@@ -340,2 +343,6 @@ obj['category'] = 'pc';

DATASET[obj.label] = obj;
obj = {label:'trendictionbot', name:'trendiction', type:'full'};
obj['vendor'] = '';
obj['category'] = 'crawler';
DATASET[obj.label] = obj;
obj = {label:'mixi', name:'mixi', type:'full'};

@@ -446,2 +453,17 @@ obj['vendor'] = '';

};
var yandexBrowserPattern = /YaBrowser\/([.0-9]+)/;
var challengeYandexBrowser = exports.challengeYandexBrowser = function(ua, result) {
if (ua.indexOf('YaBrowser/') < 0)
return false;
var version;
var match = yandexBrowserPattern.exec(ua);
if (match) {
version = match[1];
} else {
version = dataset.VALUE_UNKNOWN;
}
updateMap(result, dataset.get('YaBrowser'));
updateVersion(result, version);
return true;
};
var edgePattern = /Edge\/([.0-9]+)/;

@@ -455,2 +477,4 @@ var firefoxiOSPattern = /FxiOS\/([.0-9]+)/;

return false;
if (ua.indexOf('Chrome') >= 0 && ua.indexOf('wv') >= 0)
return false;
var version = dataset.VALUE_UNKNOWN;

@@ -526,2 +550,12 @@ var match;

var version = dataset.VALUE_UNKNOWN;
// Android(Lollipop and Above)
if (ua.indexOf('Chrome') >= 0 && ua.indexOf('wv') >= 0) {
var vmatch = webviewVersionPattern.exec(ua);
if (vmatch)
version = vmatch[1];
updateMap(result, dataset.get('Webview'));
updateVersion(result, version);
return true;
}
// iOS
var match = webviewPattern.exec(ua);

@@ -970,3 +1004,5 @@ if (match) {

if (ua.indexOf('Yeti') >= 0) {
if (ua.indexOf('http://help.naver.com/robots') >= 0) {
if (ua.indexOf('http://help.naver.com/robots') >= 0 ||
ua.indexOf('http://help.naver.com/support/robots.html') >= 0 ||
ua.indexOf('http://naver.me/bot') >= 0) {
updateMap(result, dataset.get('Yeti'));

@@ -1047,2 +1083,6 @@ return true;

}
if (ua.indexOf('trendictionbot') >= 0) {
updateMap(result, dataset.get('trendictionbot'));
return true;
}
return false;

@@ -1167,2 +1207,4 @@ };

data = dataset.get('HTTPLibrary'); version = 'php';
} else if (ua.indexOf('curl/') >= 0) {
data = dataset.get('HTTPLibrary'); version = 'curl';
}

@@ -1239,2 +1281,4 @@ if (! data)

return true;
if (browser.challengeYandexBrowser(userAgent, result))
return true;
if (browser.challengeSafariChrome(userAgent, result))

@@ -1241,0 +1285,0 @@ return true;

var fs = require('fs');
var files = fs.readdirSync('lib');
var expect = require('chai').expect;
var mocha = require('mocha')
var describe = mocha.describe
var it = mocha.it

@@ -5,0 +8,0 @@ describe('woothee', function(){

var expect = require('chai').expect;
var mocha = require('mocha')
var describe = mocha.describe
var it = mocha.it

@@ -3,0 +6,0 @@ var dataset = require('../lib/dataset');

var expect = require('chai').expect;
var mocha = require('mocha')
var describe = mocha.describe
var it = mocha.it

@@ -3,0 +6,0 @@ var fs = require('fs')

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