0.0.9 • Published 2 years ago

detect-mobile-device v0.0.9

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

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.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