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 0.3.1 to 0.3.2

12

lib/browser.js

@@ -66,3 +66,4 @@ /* HEADER BEGIN */

var operaPattern = /Opera[\/ ]([.0-9]+)/;
var operaPattern1 = /Version\/([.0-9]+)/;
var operaPattern2 = /Opera[\/ ]([.0-9]+)/;
var challengeOpera = exports.challengeOpera = function(ua, result) {

@@ -73,5 +74,10 @@ if (ua.indexOf('Opera') < 0)

var version = dataset.VALUE_UNKNOWN;
var match = operaPattern.exec(ua);
if (match)
var match = operaPattern1.exec(ua);
if (match) {
version = match[1];
} else {
match = operaPattern2.exec(ua);
if (match)
version = match[1];
}
updateMap(result, dataset.get('Opera'));

@@ -78,0 +84,0 @@ updateVersion(result, version);

@@ -106,6 +106,10 @@ /* HEADER BEGIN */

ua.indexOf('compatible; ichiro/mobile goo;') >= 0) {
updateMap(result, dataset.get('gooIchiro'));
updateMap(result, dataset.get('goo'));
return true;
}
}
if (ua.indexOf('gooblogsearch/') >= 0) {
updateMap(result, dataset.get('goo'));
return true;
}
if (ua.indexOf('Apple-PubSub') >= 0) {

@@ -119,2 +123,6 @@ updateMap(result, dataset.get('ApplePubSub'));

}
if (ua.indexOf('Genieo/') >= 0) {
updateMap(result, dataset.get('Genieo'));
return true;
}
if (ua.indexOf('labs.topsy.com/butterfly/') >= 0) {

@@ -161,3 +169,3 @@ updateMap(result, dataset.get('topsyButterfly'));

var challengeMaybeCrawler = exports.challengeMaybeCrawler = function(ua, result) {
if (/bot(?:[-_ .\/;@()]|$)/i.exec(ua)) {
if (/(bot|crawler|spider)(?:[-_ .\/;@()]|$)/i.exec(ua)) {
updateMap(result, dataset.get('VariousCrawler'));

@@ -164,0 +172,0 @@ return true;

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

// GENERATED from dataset.yaml at Thu Jan 31 19:33:03 JST 2013 by tagomoris
// GENERATED from dataset.yaml at Fri Jun 7 19:04:57 JST 2013 by tagomoris
var obj;

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

DATASET[obj.label] = obj;
obj = {label:'Genieo', name:'Genieo Web Filter', type:'full'};
obj['vendor'] = '';
obj['category'] = 'crawler';
DATASET[obj.label] = obj;
obj = {label:'topsyButterfly', name:'topsy Butterfly', type:'full'};

@@ -316,3 +320,3 @@ obj['vendor'] = '';

DATASET[obj.label] = obj;
obj = {label:'gooIchiro', name:'goo', type:'full'};
obj = {label:'goo', name:'goo', type:'full'};
obj['vendor'] = '';

@@ -319,0 +323,0 @@ obj['category'] = 'crawler';

@@ -37,4 +37,6 @@ /* HEADER BEGIN */

var data,version;
if (/^(?:Apache-HttpClient\/|Jakarta Commons-HttpClient\/|Java\/)/.exec(ua)) {
if (/^(?:Apache-HttpClient\/|Jakarta Commons-HttpClient\/|Java\/)/.exec(ua) || /[- ]HttpClient(\/|$)/.exec(ua)) {
data = dataset.get('HTTPLibrary'); version = 'Java';
} else if (ua.indexOf('Java(TM) 2 Runtime Environment,') >= 0) {
data = dataset.get('HTTPLibrary'); version = 'Java';
} else if (/^Wget/.exec(ua)) {

@@ -44,5 +46,7 @@ data = dataset.get('HTTPLibrary'); version = 'wget';

data = dataset.get('HTTPLibrary'); version = 'perl';
} else if (/^Python-urllib\//.exec(ua)) {
} else if (/^(?:Ruby|feedzirra|Typhoeus)/.exec(ua)) {
data = dataset.get('HTTPLibrary'); version = 'ruby';
} else if (/^(?:Python-urllib\/|Twisted )/.exec(ua)) {
data = dataset.get('HTTPLibrary'); version = 'python';
} else if (/^(:?PHP\/|WordPress\/|CakePHP|PukiWiki\/)/.exec(ua)) {
} else if (/^(:?PHP|WordPress|CakePHP|PukiWiki|PECL::HTTP)(?:\/| |$)/.exec(ua) || /(?:PEAR |)HTTP_Request(?: class|2)/.exec(ua)) {
data = dataset.get('HTTPLibrary'); version = 'php';

@@ -63,3 +67,9 @@ } else if (ua.indexOf('PEAR HTTP_Request class;') >= 0) {

var data = null;
if (/rss(?:reader|bar|[-_ \/;()])/i.exec(ua)) data = dataset.get('VariousRSSReader');
if (/rss(?:reader|bar|[-_ \/;()]|[ +]*\/)/i.exec(ua) || /headline-reader/i.exec(ua)) {
data = dataset.get('VariousRSSReader');
}
else {
if (ua.indexOf('cococ/') >= 0)
data = dataset.get('VariousRSSReader');
}

@@ -66,0 +76,0 @@ if (! data)

{
"name": "woothee",
"version": "0.3.1",
"version": "0.3.2",
"description": "User-Agent string parser (js implementation)",

@@ -5,0 +5,0 @@ "main": "./release/woothee",

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

// GENERATED at Thu Jan 31 19:37:42 JST 2013 by tagomoris
// GENERATED at Thu Jun 6 17:29:07 JST 2013 by tagomoris
var dataset = {};

@@ -430,3 +430,4 @@ (function(){

var operaPattern = /Opera[\/ ]([.0-9]+)/;
var operaPattern1 = /Version\/([.0-9]+)/;
var operaPattern2 = /Opera[\/ ]([.0-9]+)/;
var challengeOpera = exports.challengeOpera = function(ua, result) {

@@ -437,5 +438,10 @@ if (ua.indexOf('Opera') < 0)

var version = dataset.VALUE_UNKNOWN;
var match = operaPattern.exec(ua);
if (match)
var match = operaPattern1.exec(ua);
if (match) {
version = match[1];
} else {
match = operaPattern2.exec(ua);
if (match)
version = match[1];
}
updateMap(result, dataset.get('Opera'));

@@ -442,0 +448,0 @@ updateVersion(result, version);

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