New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

detect-mobile-device

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

detect-mobile-device

detect mobile site device type

  • 0.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 14 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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