Comparing version 1.7.0 to 1.8.0
@@ -35,2 +35,19 @@ /* HEADER BEGIN */ | ||
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]+)/; | ||
@@ -37,0 +54,0 @@ var firefoxiOSPattern = /FxiOS\/([.0-9]+)/; |
@@ -37,3 +37,3 @@ var KEY_LABEL = exports.KEY_LABEL = 'label', | ||
var DATASET = {}; | ||
// GENERATED from dataset.yaml at Sat Aug 19 23:46:35 JST 2017 by tell_k | ||
// GENERATED from dataset.yaml at Sun Jul 22 01:16:13 JST 2018 by tell_k | ||
var obj; | ||
@@ -67,2 +67,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'}; | ||
@@ -69,0 +72,0 @@ obj['category'] = 'pc'; |
@@ -74,2 +74,5 @@ /* HEADER BEGIN */ | ||
if (browser.challengeYandexBrowser(userAgent, result)) | ||
return true; | ||
if (browser.challengeSafariChrome(userAgent, result)) | ||
@@ -76,0 +79,0 @@ return true; |
{ | ||
"name": "woothee", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "User-Agent string parser (js implementation)", | ||
"main": "./release/woothee", | ||
"devDependencies": { | ||
"mocha": ">= 1.7.0", | ||
"mocha": "~3.5.3", | ||
"chai": ">= 1.3.0", | ||
@@ -9,0 +9,0 @@ "js-yaml": ">= 1.0.3", |
@@ -50,3 +50,5 @@ var fs = require('fs') | ||
fs.writeFile(js_file, header_data + defs.join("\n") + footer_data); | ||
fs.writeFile(js_file, header_data + defs.join("\n") + footer_data, function(err){ | ||
if (err) throw err; | ||
}); | ||
}; | ||
@@ -53,0 +55,0 @@ |
@@ -66,3 +66,5 @@ var fs = require('fs') | ||
fs.writeFile(target_path, header_data + defs.join("\n") + footer_data); | ||
fs.writeFile(target_path, header_data + defs.join("\n") + footer_data, function(err) { | ||
if (err) throw err; | ||
}); | ||
}; | ||
@@ -69,0 +71,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2989
123983
27