Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-device-detect

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-device-detect - npm Package Compare versions

Comparing version 1.11.14 to 1.12.0

.idea/codeStyles/codeStyleConfig.xml

8

main.js

@@ -35,3 +35,3 @@ 'use strict';

var nav = getNavigatorInstance();
return nav && (nav.platform.includes(type) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
return nav && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
};

@@ -432,3 +432,3 @@

var ua = nav && nav.userAgent.toLowerCase();
return typeof ua === 'string' ? ua.includes('electron') : false;
return typeof ua === 'string' ? /electron/.test(ua) : false;
};

@@ -502,5 +502,5 @@

var isChromium = isChromiumType();
var isMobile = isMobileAndTabletType();
var isMobile = isMobileAndTabletType() || getIPad13();
var isMobileOnly = isMobileType();
var isTablet = isTabletType();
var isTablet = isTabletType() || getIPad13();
var isBrowser = isBrowserType();

@@ -507,0 +507,0 @@ var isAndroid = isAndroidType();

{
"name": "react-device-detect",
"version": "1.11.14",
"version": "1.12.0",
"description": "Detect device type and render your component according to it",

@@ -66,4 +66,4 @@ "main": "main.js",

"dependencies": {
"ua-parser-js": "^0.7.20"
"ua-parser-js": "^0.7.21"
}
}
## react-device-detect
Detect device, and render view according to detected device type.
Detect device, and render view according to the detected device type.

@@ -56,3 +56,3 @@ ## Installation

If you want to leave a message to specific browser (e.g IE), you can use `isIE` selector
If you want to leave a message to a specific browser (e.g IE), you can use `isIE` selector

@@ -70,3 +70,3 @@ ```javascript

If you want to render a view on specific device and with specific condition:
If you want to render a view on a specific device and with a specific condition:

@@ -87,3 +87,3 @@ ```javascript

Yoa can style view component by passing class to `viewClassName` prop
You can style view component by passing class to `viewClassName` prop

@@ -90,0 +90,0 @@ ```html

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