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

device-detector

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

device-detector - npm Package Compare versions

Comparing version 0.1.18 to 0.1.32

test/specs/detecting/detect.js

14

package.json
{
"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

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