ua_parser

check browser and browser's version from userAgent

npm install ua_parser
10 downloads in the last week
32 downloads in the last month

ua_parser

check browser and browser's version from userAgent

Build Status

usage

browser


var ua = daumtools.userAgent(); // or window.ua_result

// result
{
    ua,
    browser: {
        [msie | safari | firefox | chrome | opera | android | iphone | ipad | ipod | polaris | dolfin | unknown] : true,
        name: "msie" | "safari" | "firefox" | "chrome" | "opera" | "android" | "iphone" | "ipad" | "ipod" | "polaris" | "dolfin" | "unknown", // type string
        version: {
            info,  // type string (version full string : [major.minor.patch])
            major, // type string
            minor, // type string
            patch  // type string
        }
    },
    platform : ["pc" | "tablet" | "mobile"], // type string
    os : {
        ["windows" | "mac" | "linux" | "android" | "ios" | "blackberry" | "unknown"] : true,
        name : "windows" | "mac" | "linux" | "android" | "ios" | "blackberry" | "unknown" // type string
    },
    app: {
        isApp: true | false, // type boolen
        name: "daumapps" | "crios", // type string
        version: {
            info,  // type string (version full string : [major.minor.patch])
            major, // type string
            minor, // type string
            patch  // type string
        }
    }
}

nodejs

install


npm install ua_parser

var result = require("ua_parser").userAgent(USERAGENT_STRING);

// result
{
    ua,
    browser: {
        [msie | safari | firefox | chrome | opera | android | iphone | ipad | ipod | polaris | dolfin | unknown] : true,
        name: "msie" | "safari" | "firefox" | "chrome" | "opera" | "android" | "iphone" | "ipad" | "ipod" | "polaris" | "dolfin" | "unknown", // type string
        version: {
            info,  // type string (version full string : [major.minor.patch])
            major, // type string
            minor, // type string
            patch  // type string
        }
    },
    platform : ["pc" | "tablet" | "mobile"], // type string
    os : {
        ["windows" | "mac" | "linux" | "android" | "ios" | "blackberry" | "unknown"] : true,
        name : "windows" | "mac" | "linux" | "android" | "ios" | "blackberry" | "unknown" // type string
    },
    app: {
        isApp: true | false, // type boolen
        name: "daumapps" | "crios", // type string
        version: {
            info,  // type string (version full string : [major.minor.patch])
            major, // type string
            minor, // type string
            patch  // type string
        }
    }
}
npm loves you