Have ideas to improve npm?Join in the discussion! »

    web-browser-detection

    0.9.1 • Public • Published

    web-browser-detection

    build version package dependencies minified linter tests license hits Gitter

    The lastest version of this document is available on Github > web-browser-detection

    introduction

    detect web browser informations

    based on jquery.browser under MIT License

    but remove jQuery dependency

    Installation

    npm install web-browser-detection --save
    

    or

    yarn add web-browser-detection --save
    

    prerequisites for browser

    <script src="node_modules/web-browser-detection/distrib/web-browser-detection.min.js"></script>
    

    usage

    <script>
       var browser = webBrowserDetection();
       // => {"rv":true,"version":"11.0","versionNumber":11,"win":true,"desktop":true,"msie":true,"name":"msie","platform":"win"} 
    </script>
    
    BrowserPlatformVersionsResult
    ChromeWindows 7all*{
    chrome: true,
    version: "66.0.3359.139",
    versionNumber: 66,
    win: true,
    desktop: true,
    webkit: true
    , name:"chrome",
    platform:"win"
    }
    FirefoxWindows 7all*{
    mozilla: true,
    version: "60.0",
    versionNumber: 60,
    win: true,
    desktop: true,
    name: "mozilla",
    platform: "win"
    }
    Internet ExplorerWindows 7all*{
    desktop: true,
    msie: true,
    name: "msie",
    platform: "win",
    rv: true,
    version: "11.0",
    versionNumber: 11,
    win: true
    }

    more

    * Need some help for all versions

    Note Important dependencies and minified

    Install

    npm i web-browser-detection

    DownloadsWeekly Downloads

    3

    Version

    0.9.1

    License

    MIT

    Unpacked Size

    29.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar