Code Monkey home page Code Monkey logo

detect-mobile-device's Introduction

detect-mobile-device

detect mobile site device type

NPM JavaScript Style Guide

Install

npm install --save detect-mobile-device

Usage

  import { isWeiXin } from 'detect-mobile-device';

  console.log(isWeiXin());
  // true

API

/**
 * 获取 UA
 * @return {string}
 */
export declare function getUserAgent(): string;
/**
 * 判断是否是手机
 * @return {boolean}
 */
export declare function isMobile(): boolean;
/**
 * 判断是否是 android 设备
 * @return {boolean}
 */
export declare function isAndroid(): boolean;
/**
 * 判断是否 ios 设备
 * @return {boolean}
 */
export declare function isIOS(): boolean;
/**
 * 是否是 微信 设备
 * @return {boolean}
 */
export declare function isWeiXin(): boolean;
/**
 * 判断是否是 mobile 微信
 * @return {boolean}
 */
export declare function isMWeiXin(): boolean;
/**
 * 判断是否是手机qq
 * @return {boolean}
 */
export declare function isMQQ(): boolean;
/**
 * 判断是否是手机微博 UA
 * @return {boolean}
 */
export declare function isMWeibo(): boolean;
/**
 * 判断是否是江湖 daily App
 */
export declare function isJianghuDaily(): boolean;
/**
 * 判断是否是飞书
 */
export declare function isLark(): boolean;

0.0.8 (2022-05-14)

  • fix: 修复 qq 新版本更新后导致判断 isMQQ 返回 false 的问题

0.0.7 (2022-01-21)

  • feat: 加入微信小程序

0.0.5 (2021-06-15)

  • feat: 加入飞书判断

0.0.4 (2018-11-30)

  • feat: 加入江湖 daily app 判断

0.0.3 (2018-11-28)

  • feat: init commit

License

MIT © jf3096

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.