Comparing version 3.1.6 to 4.0.0
20
index.js
@@ -16,3 +16,2 @@ /** | ||
var _android = 'android' | ||
var _wrapper = 'wrapper' | ||
var _mobile = '.+mobile' | ||
@@ -101,21 +100,2 @@ var _webkit = 'webkit' | ||
/** | ||
* wrapped webview native app detection | ||
*/ | ||
test.call(obj, _fullUA, 'webview', | ||
[ true, false ], | ||
[ 'crosswalk' ], | ||
[ 'vigour-' + _wrapper, _wrapper ], | ||
[ 'cordova' ], | ||
[ 'ploy-native' ] | ||
) | ||
const android = _ua && _ua.match(/Android ([0-9.]+)/i) | ||
if (android) { | ||
obj.android = android[1] | ||
} | ||
const chrome = _ua && _ua.match(/Chrome\/([0-9.]+)/i) | ||
if (chrome) { | ||
obj.chrome = chrome[1] | ||
} | ||
return obj | ||
@@ -122,0 +102,0 @@ |
'use strict' | ||
exports.devices = ['desktop', 'tablet', 'phone', 'console', 'tv', 'cast', 'firetv', 'sticktv', 'rikstv'] | ||
exports.devices = ['desktop', 'tablet', 'phone', 'console', 'tv', 'cast', 'firetv', 'sticktv'] | ||
exports.platforms = ['windows', 'linux', 'lg', 'firefox', 'mac', 'ios', 'xbox', 'playstation', 'android', 'cast', 'samsung', 'rikstv'] | ||
exports.platforms = [ 'windows', 'linux', 'lg', 'firefox', 'mac', 'ios', 'xbox', 'playstation', 'android', 'cast', 'samsung' ] |
{ | ||
"name": "vigour-ua", | ||
"version": "3.1.6", | ||
"version": "4.0.0", | ||
"description": "lightweight ua parser", | ||
@@ -22,3 +22,3 @@ "main": "index.js", | ||
"author": "Jim de Beer", | ||
"license": "ISC", | ||
"license": "MIT", | ||
"bugs": { | ||
@@ -33,7 +33,8 @@ "url": "https://github.com/vigour-io/ua/issues" | ||
"istanbul": "^0.4.2", | ||
"nodemon": "^1.11.0", | ||
"pre-commit": "^1.1.3", | ||
"standard": "^10.0.3", | ||
"tap-difflet": "0.4.0", | ||
"tape": "^4.5.1", | ||
"nodemon": "^1.11.0" | ||
"tape": "^4.5.1" | ||
} | ||
} |
@@ -42,11 +42,2 @@ 'use strict' | ||
test('devices - iPhone wrapper', function (t) { | ||
t.plan(useragents.ployNative.length * 2) | ||
check({ | ||
list: useragents.ployNative, | ||
platform: 'ios', | ||
device: 'phone' | ||
}, t) | ||
}) | ||
test('devices - iPod', function (t) { | ||
@@ -53,0 +44,0 @@ t.plan(useragents.iPod.length * 2) |
@@ -10,4 +10,3 @@ 'use strict' | ||
platform: 'node.js', | ||
device: 'server', | ||
webview: false | ||
device: 'server' | ||
} | ||
@@ -22,4 +21,3 @@ | ||
platform: 'mac', | ||
device: 'desktop', | ||
webview: false | ||
device: 'desktop' | ||
}) | ||
@@ -40,4 +38,3 @@ }) | ||
device: 'desktop', | ||
field: true, | ||
webview: false | ||
field: true | ||
}) | ||
@@ -44,0 +41,0 @@ }) |
@@ -107,11 +107,2 @@ | ||
exports.rikstv = ['Ekioh/2.2.8.2 (Linux; Oct 31 2013; r12704) RiksTV/Strongv1'] | ||
exports.ployNative = [ | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 ploy-native', | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 *VG*ploy-native,webkit,v1.0.0', | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 *VG*ploy-native,webkit,com.example.tvae,v1.0.0', | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 *VG*ploy-native,webkit,com.example.tv,v1.0.0' | ||
] | ||
exports.chromeCast = | ||
@@ -118,0 +109,0 @@ [ 'Mozilla/5.0 (CrKey armv7l 1.4.15250) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.0 Safari/537.36' |
@@ -6,2 +6,1 @@ 'use strict' | ||
require('./common/methods') | ||
require('./common/native') |
Sorry, the diff of this file is not supported yet
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
125351
0
8
14
452