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.0.7 to 0.0.8

2

package.json
{
"version": "0.0.7",
"version": "0.0.8",
"name": "device-detector",

@@ -4,0 +4,0 @@ "description": "Simple way to detect device info on Node.js and Browser",

@@ -88,3 +88,3 @@ device-detector

```
var ua = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1';
var ua = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
var deviceInfo = DeviceDetector.parse(ua);

@@ -97,7 +97,7 @@ ```

{
type: 'Desktop',
browser: 'Firefox',
engine: 'Gecko',
version: '40.1',
os: 'Windows NT'
type: 'Bot',
browser: '',
engine: 'Googlebot',
version: '2.1',
os: ''
}

@@ -141,3 +141,3 @@

In the browsers, this method automatically executes and its result - current browser info - is being set to DeviceDetector.info property.
In the browsers, this method automatically executes and its result - current browser info - is being set to DeviceDetector.info property.

@@ -150,3 +150,3 @@ Also, if you don't pass "userAgent" parameter while calling "parse" method, it will return DeviceDetector.info instead of parsing again.

```
git clone https://github.com/techpush/device-detector.git
git clone https://github.com/ndaidong/device-detector.git
cd device-detector

@@ -153,0 +153,0 @@ npm install

@@ -5,12 +5,14 @@ require('babel/register');

var path = require('path');
/**
* Import specs
*/
var dirs = [''];
dirs.forEach(function(dir){
var where = './test/specs/'+dir;
var where = './test/specs/' + dir;
if(fs.existsSync(where)){
fs.readdirSync(where).forEach(function(file){
if(path.extname(file)==='.js'){
require(path.join('.'+where, file));
if(path.extname(file) === '.js'){
require(path.join('.' + where, file));
}

@@ -17,0 +19,0 @@ });

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