Socket
Socket
Sign inDemoInstall

yu-judge-browser

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    yu-judge-browser

a simple plugin develop cli with babel


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Introduce

this is a simple script use useragent to judge browser

Quick to start

Using npm:

$ npm install --save yu-judge-browser
$ import browser from 'yu-judge-browser'

Example

    console.log(browser)

    {
        "versions":{
            "trident":false,
            "presto":false,
            "webKit":true,
            "gecko":false,
            "mobile":false,
            "ios":false,
            "android":false,
            "iPhone":true,
            "iPad":false,
            "qq":false,
            "wechat":false,
            "webApp":false
        },
        "language":"zh-cn"
    }"

JSDoc

 * @returns {object[]} versions - true or false of different terminals
 * @returns {boolean} [versions[].trident] - is ie ?
 * @returns {boolean} [versions[].presto] - is opera ?
 * @returns {boolean} [versions[].AppleWebKit] - is apple,chrome ?
 * @returns {boolean} [versions[].gecko] - is firefox ?
 * @returns {boolean} [versions[].mobile] - is mobile ?
 * @returns {boolean} [versions[].ios] - is ios ?
 * @returns {boolean} [versions[].android] - is android ?
 * @returns {boolean} [versions[].iPhone] - is iPhone ?
 * @returns {boolean} [versions[].iPad] - is iPad ?
 * @returns {boolean} [versions[].qq] - is qq browser ?
 * @returns {boolean} [versions[].wechat] - is wechat browser ?
 * @returns {boolean} [versions[].webApp] - is webApp ?
 * @returns {string} language - language of this web

github npm

Keywords

FAQs

Last updated on 29 Dec 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc