Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yu-judge-browser

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

yu-judge-browser

a simple plugin develop cli with babel

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 29 Dec 2017

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