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

ua-parser-js

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ua-parser-js - npm Package Compare versions

Comparing version 0.7.1 to 0.7.3

dist/ua-parser.min.js

2

bower.json
{
"name": "ua-parser-js",
"version": "0.7.1",
"version": "0.7.3",
"authors": [

@@ -5,0 +5,0 @@ "Faisal Salman <fyzlman@gmail.com>"

{
"name": "ua-parser-js",
"version": "0.7.1",
"version": "0.7.3",
"description": "Lightweight JavaScript-based user-agent string parser",

@@ -5,0 +5,0 @@ "keywords": ["user-agent", "parser", "browser", "engine", "os", "device", "cpu"],

{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.1",
"version": "0.7.3",
"author": "Faisal Salman <fyzlman@gmail.com> (http://faisalman.com)",

@@ -49,3 +49,3 @@ "description": "Lightweight JavaScript-based user-agent string parser",

"jshint": "~1.1.0",
"mocha": "~1.7.1",
"mocha": "~1.8.0",
"uglify-js": "~1.3.4"

@@ -71,5 +71,6 @@ },

"directories": {
"lib": "src",
"dist": "dist",
"src": "src",
"test": "test"
}
}

@@ -5,3 +5,3 @@ # UAParser.js

[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.png?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)
[![Build Status](https://travis-ci.org/faisalman/ua-parser-js.svg?branch=master)](https://travis-ci.org/faisalman/ua-parser-js)

@@ -42,8 +42,9 @@ * Author : Faisal Salman <<fyzlman@gmail.com>>

# Possible 'device.type':
console, mobile, tablet, smarttv
console, mobile, tablet, smarttv, wearable, embedded
# Possible 'device.vendor':
Acer, Alcatel, Amazon, Apple, Asus, BenQ, BlackBerry, Dell, GeeksPhone,
HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Motorola, Nexian, Nintendo, Nokia,
Palm, Panasonic, Polytron, RIM, Samsung, Siemens, Sony-Ericsson, Sprint, ZTE
Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone,
Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian,
Nintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp,
Siemens, Sony-Ericsson, Sprint, Xbox, ZTE

@@ -69,8 +70,8 @@ # 'device.model' determined dynamically

# Possible 'os.name'
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS,
AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki,
Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS,
Joli, Linux, Mac OS, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, Nintendo,
OpenBSD, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS,
RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu,
UNIX, WebOS, Windows [Phone/Mobile], Zenwalk
Joli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD,
Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat,
RIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen,
Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk

@@ -85,3 +86,4 @@ # 'os.version' determined dynamically

# Possible 'cpu.architecture'
68k, amd64, arm, ia32, ia64, irix, irix64, mips, mips64, pa-risc, ppc, sparc, sparc64
68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc,
ppc, sparc, sparc64
```

@@ -88,0 +90,0 @@

@@ -1,7 +0,9 @@

// UAParser.js v0.7.1
// Lightweight JavaScript-based User-Agent string parser
// https://github.com/faisalman/ua-parser-js
//
// Copyright © 2012-2014 Faisal Salman <fyzlman@gmail.com>
// Dual licensed under GPLv2 & MIT
/**
* UAParser.js v0.7.3
* Lightweight JavaScript-based User-Agent string parser
* https://github.com/faisalman/ua-parser-js
*
* Copyright © 2012-2014 Faisal Salman <fyzlman@gmail.com>
* Dual licensed under GPLv2 & MIT
*/

@@ -17,3 +19,3 @@ (function (window, undefined) {

var LIBVERSION = '0.7.1',
var LIBVERSION = '0.7.3',
EMPTY = '',

@@ -34,3 +36,5 @@ UNKNOWN = '?',

TABLET = 'tablet',
SMARTTV = 'smarttv';
SMARTTV = 'smarttv',
WEARABLE = 'wearable',
EMBEDDED = 'embedded';

@@ -72,4 +76,6 @@

var result, i = 0, j, k, p, q, matches, match, args = arguments;
// loop through all regexes maps
for (var result, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) {
while (i < args.length && !matches) {

@@ -93,4 +99,5 @@ var regex = args[i], // even sequence (0,2,4,..)

// try matching uastring with regexes
for (j = k = 0; j < regex.length; j++) {
matches = regex[j].exec(this.getUA());
j = k = 0;
while (j < regex.length && !matches) {
matches = regex[j++].exec(this.getUA());
if (!!matches) {

@@ -126,7 +133,5 @@ for (p = 0; p < props.length; p++) {

}
break;
}
}
if(!!matches) break; // break the loop immediately if match found
i += 2;
}

@@ -211,2 +216,3 @@ return result;

'8.1' : 'NT 6.3',
'10' : 'NT 6.4',
'RT' : 'ARM'

@@ -441,4 +447,4 @@ }

/(ia64(?=;)|68k(?=\))|arm(?=v\d+;)|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i
// IA64, 68K, ARM, IRIX, MIPS, SPARC, PA-RISC
/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+;))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
], [[ARCHITECTURE, util.lowerize]]

@@ -458,2 +464,3 @@ ],

/(archos)\s(gamepad2?)/i, // Archos
/(hp).+(touchpad)/i, // HP TouchPad

@@ -481,7 +488,7 @@ /(kindle)\/([\w\.]+)/i, // Kindle

], [VENDOR, MODEL, [TYPE, MOBILE]], [
/\((bb10);\s(\w+)/i // BlackBerry 10
], [[VENDOR, 'BlackBerry'], MODEL, [TYPE, MOBILE]], [
/\(bb10;\s(\w+)/i // BlackBerry 10
], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [
// Asus Tablets
/android.+((transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7))/i
], [[VENDOR, 'Asus'], MODEL, [TYPE, TABLET]], [
/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7)/i
], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [

@@ -491,13 +498,17 @@ /(sony)\s(tablet\s[ps])/i // Sony Tablets

/\s(ouya)\s/i, // Ouya
/(nintendo)\s([wids3u]+)/i // Nintendo
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
/((playstation)\s[3portablevi]+)/i // Playstation
], [[VENDOR, 'Sony'], MODEL, [TYPE, CONSOLE]], [
/android.+;\s(shield)\sbuild/i // Nvidia
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/(playstation\s[3portablevi]+)/i // Playstation
], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [
/(sprint\s(\w+))/i // Sprint Phones
], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [
/(Lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i // Lenovo tablets
], [[VENDOR, 'Lenovo'], MODEL, [TYPE, TABLET]], [
/(lenovo)\s?(S(?:5000|6000)+(?:[-][\w+]))/i // Lenovo tablets
], [VENDOR, MODEL, [TYPE, TABLET]], [

@@ -510,2 +521,7 @@ /(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i, // HTC

/[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin
], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [
// Motorola

@@ -515,4 +531,4 @@ /\s((milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?(:?\s4g)?))[\w\s]+build\//i,

], [[VENDOR, 'Motorola'], MODEL, [TYPE, MOBILE]], [
/android.+\s((mz60\d|xoom[\s2]{0,2}))\sbuild\//i
], [[VENDOR, 'Motorola'], MODEL, [TYPE, TABLET]], [
/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i
], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [

@@ -526,4 +542,8 @@ /android.+((sch-i[89]0\d|shw-m380s|gt-p\d{4}|gt-n8000|sgh-t8[56]9|nexus 10))/i,

], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [
/(sie)-(\w+)*/i // Siemens
], [[VENDOR, 'Siemens'], MODEL, [TYPE, MOBILE]], [
/(samsung);smarttv/i
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i // Sharp
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [
/sie-(\w+)*/i // Siemens
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [

@@ -534,4 +554,4 @@ /(maemo|nokia).*(n900|lumia\s\d+)/i, // Nokia

/android\s3\.[\s\w-;]{10}((a\d{3}))/i // Acer
], [[VENDOR, 'Acer'], MODEL, [TYPE, TABLET]], [
/android\s3\.[\s\w-;]{10}(a\d{3})/i // Acer
], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [

@@ -541,12 +561,18 @@ /android\s3\.[\s\w-;]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet

/(lg) netcast\.tv/i // LG SmartTV
], [VENDOR, [TYPE, SMARTTV]], [
/((nexus\s[45]))/i, // LG
/(lg)[e;\s\/-]+(\w+)*/i
], [[VENDOR, 'LG'], MODEL, [TYPE, MOBILE]], [
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/(nexus\s[45])/i, // LG
/lg[e;\s\/-]+(\w+)*/i
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [
/android.+((ideatab[a-z0-9\-\s]+))/i // Lenovo
], [[VENDOR, 'Lenovo'], MODEL, [TYPE, TABLET]], [
/android.+(ideatab[a-z0-9\-\s]+)/i // Lenovo
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
/linux;.+((jolla));/i // Jolla
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/((pebble))app\/[\d\.]+\s/i // Pebble
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
/android.+;\s(glass)\s\d/i // Google Glass
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [

@@ -584,5 +610,5 @@ /(mobile|tablet);.+rv\:.+gecko\//i // Unidentifiable

/(blackberry)\w*\/?([\w\.]+)*/i, // Blackberry
/(tizen)\/([\w\.]+)/i, // Tizen
/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i,
// Android/WebOS/Palm/QNX/Bada/RIM/MeeGo
/(tizen)[\/\s]([\w\.]+)/i, // Tizen
/(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego|contiki)[\/\s-]?([\w\.]+)*/i,
// Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki
/linux;.+(sailfish);/i // Sailfish OS

@@ -602,5 +628,6 @@ ], [NAME, VERSION], [

/(mint)[\/\s\(]?(\w+)*/i, // Mint
/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i,
/(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux
/(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?([\w\.-]+)*/i,
// Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware
// Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk
// Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus
/(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux

@@ -624,10 +651,12 @@ /(gnu)\s?([\w\.]+)*/i // GNU

/(mac\sos\sx)\s?([\w\s\.]+\w)*/i // Mac OS
], [NAME, [VERSION, /_/g, '.']], [
/(mac\sos\sx)\s?([\w\s\.]+\w)*/i,
/(macintosh|mac(?=_powerpc)\s)/i // Mac OS
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [
// Other
/((?:open)?solaris)[\/\s-]?([\w\.]+)*/i, // Solaris
/(haiku)\s(\w+)/i, // Haiku
/(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX
/(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i,
// Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS
/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms)/i,
// Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS
/(unix)\s?([\w\.]+)*/i // UNIX

@@ -704,3 +733,5 @@ ], [NAME, VERSION]

SMARTTV : SMARTTV,
TABLET : TABLET
TABLET : TABLET,
WEARABLE: WEARABLE,
EMBEDDED: EMBEDDED
};

@@ -707,0 +738,0 @@ UAParser.ENGINE = {

@@ -475,3 +475,3 @@ [

{
"name" : "Mac OS X",
"name" : "Mac OS",
"version" : "10.6.8"

@@ -478,0 +478,0 @@ }

{
"title": "UAParser.js",
"name": "ua-parser-js",
"version": "0.7.1",
"version": "0.7.3",
"description": "Lightweight JavaScript-based user-agent string parser",

@@ -31,3 +31,3 @@ "keywords": [

"docs": "https://github.com/faisalman/ua-parser-js",
"download": "https://raw.github.com/faisalman/ua-parser-js/master/src/ua-parser.min.js"
"download": "https://raw.github.com/faisalman/ua-parser-js/master/dist/ua-parser.min.js"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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