react-useragent
Advanced tools
Comparing version
{ | ||
"name": "react-useragent", | ||
"version": "1.1.0-beta", | ||
"version": "1.1.1-alpha", | ||
"description": "Utility to add user agent information to your react components", | ||
@@ -5,0 +5,0 @@ "author": "Jon Stuebe", |
@@ -5,5 +5,5 @@ # React User Agent | ||
```shell | ||
yarn add react-useragent | ||
``` | ||
$ yarn add react-useragent | ||
``` | ||
@@ -14,3 +14,3 @@ ## Usage | ||
``` | ||
```javascript | ||
import React, { Component } from 'react'; | ||
@@ -36,3 +36,3 @@ import { UserAgent } from 'react-useragent'; | ||
``` | ||
```javascript | ||
import React, { Component } from 'react'; | ||
@@ -56,5 +56,5 @@ import { UserAgent } from 'react-useragent'; | ||
``` | ||
import React, { Component } from 'react'; | ||
import { withUserAgent } from 'react-useragent'; | ||
```javascript | ||
import React, { Component } from "react"; | ||
import { withUserAgent } from "react-useragent"; | ||
@@ -64,8 +64,4 @@ class App extends Component { | ||
<div> | ||
{this.props.ua.mobile ? ( | ||
<input type="date" /> | ||
) : ( | ||
<input type="text" /> | ||
)} | ||
</div> | ||
{this.props.ua.mobile ? <input type="date" /> : <input type="text" />} | ||
</div>; | ||
} | ||
@@ -81,3 +77,3 @@ } | ||
``` | ||
```json | ||
{ | ||
@@ -89,3 +85,4 @@ "mobile": null, | ||
"md": { | ||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36", | ||
"ua": | ||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36", | ||
"_cache": { | ||
@@ -92,0 +89,0 @@ "phone": null, |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
52385
8.08%6
20%1274
6.08%1
-50%91
-3.19%