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 1.0.0 to 1.0.1

.eslintignore

31

dist/DeviceDetector.js
/**
* device-detector@1.0.0
* built on: Sun, 04 Jun 2017 14:51:40 GMT
* device-detector@1.0.1
* built on: Mon, 07 Aug 2017 07:23:54 GMT
* repository: git@github.com:ndaidong/device-detector.git

@@ -11,9 +11,4 @@ * maintainer: @ndaidong

typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.DeviceDetector = global.DeviceDetector || {})));
(factory((global.DeviceDetector = {})));
}(this, (function (exports) { 'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var parse = function parse() {

@@ -29,4 +24,4 @@ var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

var ua = userAgent;
if (!ua && (typeof window === 'undefined' ? 'undefined' : _typeof(window)) !== undefined && window.navigator) {
ua == window.navigator.userAgent;
if (!ua && typeof window !== 'undefined' && window.navigator) {
ua = window.navigator.userAgent;
}

@@ -225,8 +220,8 @@ if (!ua) {

v = function () {
var x = '',
a = n.split(';');
var x = '';
var a = n.split(';');
for (var i = 0; i < a.length; i++) {
var ai = a[i];
if (/deepnet explorer/.test(ai)) {
x = ai.replace(/[^0-9\.]/ig, '');
x = ai.replace(/[^0-9.]/ig, '');
break;

@@ -246,8 +241,8 @@ }

v = function () {
var x = '',
a = n.split(';');
var x = '';
var a = n.split(';');
for (var i = 0; i < a.length; i++) {
var ai = a[i];
if (/msie/.test(ai)) {
x = ai.replace(/[^0-9\.]/ig, '');
x = ai.replace(/[^0-9.]/ig, '');
break;

@@ -269,4 +264,4 @@ }

} else {
var key = bname.toLowerCase(),
xkey = key;
var key = bname.toLowerCase();
var xkey = key;
var a = n.replace(xkey, '________').split(' ');

@@ -273,0 +268,0 @@ if (key === 'safari' || isDorothy) {

@@ -1,2 +0,2 @@

// device-detector@1.0.0, by @ndaidong - built on Sun, 04 Jun 2017 14:51:40 GMT - published under MIT license
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(e.DeviceDetector=e.DeviceDetector||{})}(this,function(e){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){var e={type:"Unknown",browser:"",engine:"",version:"",os:""},o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!o&&void 0!==("undefined"==typeof window?"undefined":i(window))&&window.navigator&&window.navigator.userAgent,!o)return e;var r=o.toLowerCase();e.userAgent=o;var n=function(e){return e.test(r)},t=n(/chrome/i),a=n(/safari/i),s=n(/firefox/i),p=n(/vivaldi/i),l=n(/opera/i),d=n(/opera mini/i),f=n(/edge/),u=n(/msie/i),c=n(/midori/i),b=n(/maxthon/i),m=n(/netscape/i),y=n(/konqueror/i),w=n(/minefield/i),g=n(/omniweb/i),v=n(/ucbrowser/),k=n(/webkit/i),h=n(/gecko/i),S=n(/presto/i),x=n(/trident/i),B=n(/avant browser/i),_=n(/seamonkey/i),M=n(/deepnet/i),O=n(/dorothy/i),D=n(/fennec/i),G=n(/maemo/i);e.type=function(){var e="Desktop";return n(/(iphone|ipod|((?:android)?.*?mobile)|j2me|mobi|blackberry|nokia|maemo|mini)/i)?e="Mobile":n(/(ipad|android(?!.*mobile))/i)||n(/\W(kindle|silk|tablet)\W/i)?e="Tablet":n(/(bot|crawler|spider|slurp|seeker)/i)?e="Bot":n(/(fetcher|scan|valid|check|news|engine)/i)&&(e="Util"),e}(),e.os=function(){var i="";return"Bot"===e.type||"Util"===e.type?i:(n(/android/i)?i="Android":n(/(ipad|iphone|ipod)/i)?i="iOS":n(/(blackberry)/i)?i="BlackBerry":n(/(symbos|symbian|nokia|maemo)/i)?i="SymbianOS":n(/linux/i)?i="Linux":n(/mac/i)?i="Mac":n(/iemobile/i)?i="WindowsPhone":n(/win/i)?i=n(/windows nt/i)?"Windows NT":"Windows":n(/cros/i)&&(i="ChromeOS"),i)}(),e.browser=function(){var i="";return"Bot"===e.type||"Util"===e.type?i:(!k||!t||c||p||f||v?w?i="Minefield":h&&s&&!D&&!G?i="Firefox":!k||!a||t||c||g||v||p||b||O?M?i="Deepnet Explorer":g?i="OmniWeb":v?i="UCBrowser":y?i="Konqueror":b?i="Maxthon":p?i="Vivaldi":c?i="Midori":d?i="Opera Mini":l?i="Opera":f?i="Edge":B?i="Avant Browser":_?i="SeaMonkey":n(/iemobile/i)?i="IEMobile":!u||l||p?O?i="Dorothy Browser":D?i="Fennec":G?i="Maemo Browser":m&&(i="Netscape"):i="MSIE":i="Safari":i="Chrome",i||"SymbianOS"===e.os&&(i=n(/doris/i)?"Doris":n(/gobrowser/)?"GoBrowser":"Nokia Browser"),i)}(),e.engine=function(){var i="";return"Bot"===e.type||"Util"===e.type?n(/google/i)?i=n(/image/i)?"Googlebot-Image":n(/feedfetcher/i)?"Feedfetcher-Google":n(/appengine/i)?"AppEngine-Google":"Googlebot":n(/bing/i)?i="Bingbot":n(/baidu/i)?i="BaiduSpider":n(/yandexbot/i)?i="YandexBot":n(/yandeximages/i)?i="YandexImages":n(/yahoo/i)?i=n(/yahooseeker/i)?"YahooSeeker":"Yahoo! Slurp":n(/soso/i)?i="Sosospider":n(/exabot/i)?i="Exabot":n(/sogou/i)?i="Sogou Spider":n(/newsgator/i)&&(i="NewsGator"):k?i="Webkit":h?i="Gecko":x?i="Trident":S&&(i="Presto"),i}();return e.version=function(){var i="Bot"===e.type||"Util"===e.type?e.engine:e.browser,o="";if(M)o=function(){for(var e="",i=r.split(";"),o=0;o<i.length;o++){var n=i[o];if(/deepnet explorer/.test(n)){e=n.replace(/[^0-9\.]/gi,"");break}}return e}();else if("YahooSeeker"===i)o=function(){return r.split(" ")[0].replace("yahooseeker/","")}();else if(B||u)o=function(){for(var e="",i=r.split(";"),o=0;o<i.length;o++){var n=i[o];if(/msie/.test(n)){e=n.replace(/[^0-9\.]/gi,"");break}}return e}();else if("Nokia Browser"===e.browser)o=function(){var e=r.split("symbianos/");return e[1]?parseFloat(e[1]):""}();else if("GoBrowser"===e.browser)o=function(){var e=r.split("gobrowser/");return e[1]?parseFloat(e[1]):""}();else{var n=i.toLowerCase(),t=n,a=r.replace(t,"________").split(" ");"safari"===n||O?n="version/":n+="/";for(var s=0;s<a.length;s++){var p=a[s].replace("________",t);if(-1!==p.indexOf(n)){var l=p.split("/");l.length>1&&(o=l[1]);break}}}return o.indexOf(";")&&(o=o.split(";")[0]),o}(),e};e.parse=o,Object.defineProperty(e,"__esModule",{value:!0})});
// device-detector@1.0.1, by @ndaidong - built on Mon, 07 Aug 2017 07:23:54 GMT - published under MIT license
!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(e.DeviceDetector={})}(this,function(e){"use strict";e.parse=function(){var e={type:"Unknown",browser:"",engine:"",version:"",os:""},i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!i&&"undefined"!=typeof window&&window.navigator&&(i=window.navigator.userAgent),!i)return e;var o=i.toLowerCase();e.userAgent=i;var r=function(e){return e.test(o)},n=r(/chrome/i),t=r(/safari/i),a=r(/firefox/i),s=r(/vivaldi/i),p=r(/opera/i),l=r(/opera mini/i),d=r(/edge/),f=r(/msie/i),b=r(/midori/i),c=r(/maxthon/i),u=r(/netscape/i),m=r(/konqueror/i),w=r(/minefield/i),g=r(/omniweb/i),v=r(/ucbrowser/),y=r(/webkit/i),k=r(/gecko/i),h=r(/presto/i),x=r(/trident/i),B=r(/avant browser/i),_=r(/seamonkey/i),S=r(/deepnet/i),M=r(/dorothy/i),O=r(/fennec/i),G=r(/maemo/i);e.type=function(){var e="Desktop";return r(/(iphone|ipod|((?:android)?.*?mobile)|j2me|mobi|blackberry|nokia|maemo|mini)/i)?e="Mobile":r(/(ipad|android(?!.*mobile))/i)||r(/\W(kindle|silk|tablet)\W/i)?e="Tablet":r(/(bot|crawler|spider|slurp|seeker)/i)?e="Bot":r(/(fetcher|scan|valid|check|news|engine)/i)&&(e="Util"),e}(),e.os=function(){var i="";return"Bot"===e.type||"Util"===e.type?i:(r(/android/i)?i="Android":r(/(ipad|iphone|ipod)/i)?i="iOS":r(/(blackberry)/i)?i="BlackBerry":r(/(symbos|symbian|nokia|maemo)/i)?i="SymbianOS":r(/linux/i)?i="Linux":r(/mac/i)?i="Mac":r(/iemobile/i)?i="WindowsPhone":r(/win/i)?i=r(/windows nt/i)?"Windows NT":"Windows":r(/cros/i)&&(i="ChromeOS"),i)}(),e.browser=function(){var i="";return"Bot"===e.type||"Util"===e.type?i:(!y||!n||b||s||d||v?w?i="Minefield":k&&a&&!O&&!G?i="Firefox":!y||!t||n||b||g||v||s||c||M?S?i="Deepnet Explorer":g?i="OmniWeb":v?i="UCBrowser":m?i="Konqueror":c?i="Maxthon":s?i="Vivaldi":b?i="Midori":l?i="Opera Mini":p?i="Opera":d?i="Edge":B?i="Avant Browser":_?i="SeaMonkey":r(/iemobile/i)?i="IEMobile":!f||p||s?M?i="Dorothy Browser":O?i="Fennec":G?i="Maemo Browser":u&&(i="Netscape"):i="MSIE":i="Safari":i="Chrome",i||"SymbianOS"===e.os&&(i=r(/doris/i)?"Doris":r(/gobrowser/)?"GoBrowser":"Nokia Browser"),i)}(),e.engine=function(){var i="";return"Bot"===e.type||"Util"===e.type?r(/google/i)?i=r(/image/i)?"Googlebot-Image":r(/feedfetcher/i)?"Feedfetcher-Google":r(/appengine/i)?"AppEngine-Google":"Googlebot":r(/bing/i)?i="Bingbot":r(/baidu/i)?i="BaiduSpider":r(/yandexbot/i)?i="YandexBot":r(/yandeximages/i)?i="YandexImages":r(/yahoo/i)?i=r(/yahooseeker/i)?"YahooSeeker":"Yahoo! Slurp":r(/soso/i)?i="Sosospider":r(/exabot/i)?i="Exabot":r(/sogou/i)?i="Sogou Spider":r(/newsgator/i)&&(i="NewsGator"):y?i="Webkit":k?i="Gecko":x?i="Trident":h&&(i="Presto"),i}();return e.version=function(){var i="Bot"===e.type||"Util"===e.type?e.engine:e.browser,r="";if(S)r=function(){for(var e="",i=o.split(";"),r=0;r<i.length;r++){var n=i[r];if(/deepnet explorer/.test(n)){e=n.replace(/[^0-9.]/gi,"");break}}return e}();else if("YahooSeeker"===i)r=o.split(" ")[0].replace("yahooseeker/","");else if(B||f)r=function(){for(var e="",i=o.split(";"),r=0;r<i.length;r++){var n=i[r];if(/msie/.test(n)){e=n.replace(/[^0-9.]/gi,"");break}}return e}();else if("Nokia Browser"===e.browser)r=function(){var e=o.split("symbianos/");return e[1]?parseFloat(e[1]):""}();else if("GoBrowser"===e.browser)r=function(){var e=o.split("gobrowser/");return e[1]?parseFloat(e[1]):""}();else{var n=i.toLowerCase(),t=n,a=o.replace(t,"________").split(" ");"safari"===n||M?n="version/":n+="/";for(var s=0;s<a.length;s++){var p=a[s].replace("________",t);if(-1!==p.indexOf(n)){var l=p.split("/");l.length>1&&(r=l[1]);break}}}return r.indexOf(";")&&(r=r.split(";")[0]),r}(),e},Object.defineProperty(e,"__esModule",{value:!0})});
{
"version": "1.0.0",
"version": "1.0.1",
"name": "device-detector",

@@ -19,5 +19,5 @@ "description": "Detect device info on Node.js and Browser",

"scripts": {
"lint": "eslint ./src ./tests",
"lint": "eslint .",
"nsp": "nsp check --output checkstyle",
"tape": "nyc babel-node node_modules/.bin/tape tests/start.js | tap-spec",
"tape": "nyc babel-node node_modules/.bin/tape test/start.js | tap-spec",
"report": "nyc report --reporter=lcov > coverage.lcov && codecov",

@@ -39,5 +39,5 @@ "pretest": "npm run lint && npm run nsp",

"codecov": "2.x.x",
"eslint": "3.x.x",
"eslint": "4.x.x",
"eslint-config-ggc": "1.x.x",
"gcc-min": "5.x.x",
"gcc-min": "6.x.x",
"nsp": "2.x.x",

@@ -44,0 +44,0 @@ "nyc": "11.x.x",

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