device-detector
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"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 @@ }); |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
38546