1.0.6 • Published 6 years ago

yu-judge-browser v1.0.6

Weekly downloads
8
License
ISC
Repository
-
Last release
6 years ago

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

Links

github npm

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago