user-device-type
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,6 +0,7 @@ | ||
function t(e) { | ||
return "desktop"; | ||
function a(e) { | ||
const t = /Mobile|Android|iP(hone|od)|BlackBerry|IEMobile|Silk|Opera Mini|Fennec|webOS|Windows Phone|PlayStation Vita/i, o = /Tablet|iPad|Nexus 7|Nexus 9|Kindle|Silk|Fennec/i, i = /Win(dows NT|dows NT 10.0|dows NT 6.1|dows NT 6.2|dows NT 6.3|dows NT 5.1|dows NT 5.2|dows NT 6.0|dows NT 5.0)|Macintosh|Intel Mac OS X|Linux|Ubuntu|CrOS/i, n = /SmartTV|AppleTV|GoogleTV|HbbTV|NetCast|WebTV|Tizen|Roku|Xbox|PlayStation|CrKey|DIAL/i; | ||
return /Watch|Wearable|Google Glass|SmartWatch|Gear/i.test(e) ? "wearable" : n.test(e) ? "tv" : o.test(e) ? "tablet" : t.test(e) ? "mobile" : i.test(e) ? "desktop" : "unknown"; | ||
} | ||
export { | ||
t as getDeviceType | ||
a as getDeviceType | ||
}; |
@@ -1,1 +0,1 @@ | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["device-type"]={}))})(this,function(e){"use strict";function t(n){return"desktop"}e.getDeviceType=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["device-type"]={}))})(this,function(e){"use strict";function t(o){const i=/Mobile|Android|iP(hone|od)|BlackBerry|IEMobile|Silk|Opera Mini|Fennec|webOS|Windows Phone|PlayStation Vita/i,n=/Tablet|iPad|Nexus 7|Nexus 9|Kindle|Silk|Fennec/i,s=/Win(dows NT|dows NT 10.0|dows NT 6.1|dows NT 6.2|dows NT 6.3|dows NT 5.1|dows NT 5.2|dows NT 6.0|dows NT 5.0)|Macintosh|Intel Mac OS X|Linux|Ubuntu|CrOS/i,l=/SmartTV|AppleTV|GoogleTV|HbbTV|NetCast|WebTV|Tizen|Roku|Xbox|PlayStation|CrKey|DIAL/i;return/Watch|Wearable|Google Glass|SmartWatch|Gear/i.test(o)?"wearable":l.test(o)?"tv":n.test(o)?"tablet":i.test(o)?"mobile":s.test(o)?"desktop":"unknown"}e.getDeviceType=t,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); |
@@ -17,7 +17,8 @@ { | ||
}, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
"preview": "vite preview", | ||
"build-docs": "vite build --config vite.config.client.js" | ||
}, | ||
@@ -24,0 +25,0 @@ "devDependencies": { |
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
6962
6
12
1
62
0