device-detector
Advanced tools
Comparing version 0.1.18 to 0.1.32
{ | ||
"version": "0.1.18", | ||
"version": "0.1.32", | ||
"name": "device-detector", | ||
@@ -16,8 +16,14 @@ "description": "Detect device info on Node.js and Browser", | ||
"scripts": { | ||
"test": "mocha test" | ||
"test": "./node_modules/.bin/tape test/start.js | tap-spec", | ||
"coverage": "./node_modules/.bin/nyc tape test/start.js | tap-spec", | ||
"report": "npm run coverage && ./node_modules/.bin/nyc report --reporter=lcov", | ||
"coveralls": "npm run report && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls" | ||
}, | ||
"devDependencies": { | ||
"bellajs": "latest", | ||
"mocha": "latest", | ||
"chai": "latest" | ||
"coveralls": "latest", | ||
"nyc": "latest", | ||
"tap-spec": "latest", | ||
"tape": "latest", | ||
"traceur": "latest" | ||
}, | ||
@@ -24,0 +30,0 @@ "keywords": [ |
@@ -6,3 +6,6 @@ device-detector | ||
[![NPM](https://badge.fury.io/js/device-detector.svg)](https://badge.fury.io/js/device-detector) ![Travis](https://travis-ci.org/ndaidong/average-rating.svg?branch=master) | ||
[![NPM](https://badge.fury.io/js/device-detector.svg)](https://badge.fury.io/js/device-detector) | ||
![Travis](https://travis-ci.org/ndaidong/device-detector.svg?branch=master) | ||
[![Coverage Status](https://coveralls.io/repos/github/ndaidong/device-detector/badge.svg?branch=master)](https://coveralls.io/github/ndaidong/device-detector?branch=master) | ||
![devDependency Status](https://david-dm.org/ndaidong/device-detector.svg) | ||
@@ -13,3 +16,3 @@ # Contents | ||
* [Usage](#usage) | ||
* [Test](#test-with-mocha) | ||
* [Test](#test) | ||
@@ -148,3 +151,3 @@ | ||
# Test with Mocha | ||
# Test | ||
@@ -155,12 +158,7 @@ ``` | ||
npm install | ||
mocha | ||
npm test | ||
``` | ||
Make sure [Mocha](https://mochajs.org/) is already and check the specs under /test folder. | ||
![DeviceDetector test with Mocha](http://i.imgur.com/dzQ3tg6.png) | ||
# License | ||
Apache License | ||
The MIT License (MIT) |
@@ -7,3 +7,3 @@ /** | ||
;(function init(context) { | ||
(function init(context) { | ||
@@ -125,3 +125,3 @@ var DeviceDetector = { | ||
if (isWebkit && isChrome && !isMidori && !isVivaldi && !isEdge) { | ||
if (isWebkit && isChrome && !isMidori && !isVivaldi && !isEdge && !isUCBrowser) { | ||
b = 'Chrome'; | ||
@@ -132,4 +132,7 @@ } else if (isMinefield) { | ||
b = 'Firefox'; | ||
} else if (isWebkit && isSafari && !isChrome && !isMidori && !isOmniWeb && !isUCBrowser && !isVivaldi && !isMaxthon && !isDorothy) { | ||
} else if (isWebkit && isSafari && !isChrome && !isMidori && !isOmniWeb && | ||
!isUCBrowser && !isVivaldi && !isMaxthon && !isDorothy) { | ||
b = 'Safari'; | ||
} else if (isDeepnetExplorer) { | ||
b = 'Deepnet Explorer'; | ||
} else if (isOmniWeb) { | ||
@@ -157,4 +160,2 @@ b = 'OmniWeb'; | ||
b = 'SeaMonkey'; | ||
} else if (isDeepnetExplorer) { | ||
b = 'Deepnet Explorer'; | ||
} else if (detect(/iemobile/i)) { | ||
@@ -161,0 +162,0 @@ b = 'IEMobile'; |
'use strict'; | ||
var traceur = require('traceur'); | ||
traceur.require.makeDefault((filename) => { | ||
return !filename.includes('node_modules'); | ||
}); | ||
var fs = require('fs'); | ||
@@ -10,3 +15,3 @@ var path = require('path'); | ||
var dirs = ['']; | ||
var dirs = [ 'detecting' ]; | ||
dirs.forEach((dir) => { | ||
@@ -13,0 +18,0 @@ let where = './test/specs/' + dir; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
0
706
3
48102
6
11
161
1