react-device-detect
Advanced tools
Comparing version 1.11.14 to 1.12.0
@@ -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 |
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
44598
14
Updatedua-parser-js@^0.7.21