adaptive-recognition

1.0.2 • Public • Published

This package provides some of the requirements we need in Vue and React development, such as determining whether it is a tablet device, a computer, or a mobile phone. So using this package can help you make better judgments.

install

npm i adaptive-recognition

Usage

Taking Vue as an example mani.js

import Vue from "vue";
import isMobile from 'adaptive-recognition'
Vue.prototype.$isMobile = isMobile

Demo. vue

<template>
  <div></div>
</template>

<script>
export default {
  created() {
    console.log(this.$isMobile()) 
  },
};
</script>

<style lang="scss" scoped>
</style>

So far, we can live with constant monitoring of a device

Readme

Keywords

Package Sidebar

Install

npm i adaptive-recognition

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

1.28 kB

Total Files

3

Last publish

Collaborators

  • biao.