New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mobile-device-detect

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobile-device-detect - npm Package Compare versions

Comparing version 0.2.3 to 0.3.3

45

dist/index.js

@@ -74,6 +74,2 @@ module.exports =

Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -92,3 +88,2 @@

var browser = UA.getBrowser();
var cpu = UA.getCPU();
var device = UA.getDevice();

@@ -118,3 +113,5 @@ var engine = UA.getEngine();

IOS = OS_TYPES.IOS;
var checkType = exports.checkType = function checkType(type) {
var checkType = function checkType(type) {
switch (type) {

@@ -138,19 +135,3 @@ case MOBILE:

var getCurrentBrowser = exports.getCurrentBrowser = function getCurrentBrowser(name) {
switch (name) {
case CHROME:
case FIREFOX:
case OPERA:
case YANDEX:
case SAFARI:
case IE:
case EDGE:
case CHROMIUM:
return true;
default:
return false;
}
};
var broPayload = exports.broPayload = function broPayload(isBrowser, browser, engine, os, ua) {
var broPayload = function broPayload(isBrowser, browser, engine, os, ua) {
return {

@@ -169,3 +150,3 @@ isBrowser: isBrowser,

var mobilePayload = exports.mobilePayload = function mobilePayload(type, device, os, ua) {
var mobilePayload = function mobilePayload(type, device, os, ua) {
return _extends({}, type, {

@@ -180,3 +161,3 @@ vendor: device.vendor,

var stvPayload = exports.stvPayload = function stvPayload(isSmartTV, engine, os, ua) {
var stvPayload = function stvPayload(isSmartTV, engine, os, ua) {
return {

@@ -192,3 +173,3 @@ isSmartTV: isSmartTV,

var consolePayload = exports.consolePayload = function consolePayload(isConsole, engine, os, ua) {
var consolePayload = function consolePayload(isConsole, engine, os, ua) {
return {

@@ -204,3 +185,3 @@ isConsole: isConsole,

var wearPayload = exports.wearPayload = function wearPayload(isWearable, engine, os, ua) {
var wearPayload = function wearPayload(isWearable, engine, os, ua) {
return {

@@ -313,2 +294,5 @@ isWearable: isWearable,

};
var getDeviceType = function getDeviceType() {
return device.type;
};

@@ -344,6 +328,7 @@ var isSmartTV = isSmartTVType();

var isYandex = isYandexType();
var deviceType = getDeviceType();
var type = checkType(device.type);
exports.default = function () {
function deviceDetect() {
var isBrowser = type.isBrowser,

@@ -382,2 +367,3 @@ isMobile = type.isMobile,

module.exports = {
deviceDetect: deviceDetect,
isSmartTV: isSmartTV,

@@ -411,3 +397,4 @@ isConsole: isConsole,

isEdge: isEdge,
isYandex: isYandex
isYandex: isYandex,
deviceType: deviceType
};

@@ -414,0 +401,0 @@

@@ -31,2 +31,4 @@ declare module "mobile-device-detect" {

export const getUA: string;
export const deviceType: string;
export function deviceDetect (): any;
}
{
"name": "mobile-device-detect",
"version": "0.2.3",
"version": "0.3.3",
"description": "Helpers for handling mobile devices",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -80,2 +80,3 @@ ## mobile-device-detect

| getUA | string | returns user agent |
| deviceType | string | returns device type (e.g `mobile` or `tablet`) |
| deviceDetect | function | return data object which includes all data about device (e.g version, engine, os etc.) |

@@ -82,0 +83,0 @@

@@ -0,0 +0,0 @@ const path = require('path');

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