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.1.0 to 0.2.0

16

package.json
{
"name": "mobile-device-detect",
"version": "0.1.0",
"version": "0.2.0",
"description": "Helpers for handling mobile devices",

@@ -12,2 +12,16 @@ "main": "dist/index.js",

},
"keywords": [
"useragent",
"mobile",
"phone",
"tablet",
"detect",
"device",
"browser",
"smart-tv",
"smarttv",
"version",
"model",
"console"
],
"scripts": {

@@ -14,0 +28,0 @@ "start": "webpack --watch",

@@ -17,6 +17,39 @@ ## mobile-device-detect

## Usage
import any helper to your component, and use it as you needed.
For example, in Vue.js:
In script section:
```html
<script>
import { isMobile } from 'mobile-device-detect';
export default {
name: 'HelloWorld',
data () {
return {
msg: isMobile ? 'Welcome to Your Vue.js mobile App!' : 'Welcome to Your Vue.js App'
}
}
}
</script>
```
pass it to template:
```html
<template>
<div class="hello">
{{ msg }}
</div>
</template>
```
For react example, you can look into separated package [react-device-detect](https://github.com/duskload/react-device-detect)
### Selectors
| prop | type | description |
| Property | Return type | Description |
| ------------------ | -------- | -------------------------------------------------------------------------------------- |

@@ -23,0 +56,0 @@ | isMobile | bool | returns true if device type is `mobile` or `tablet` |

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