mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-11-15 14:42:16 +03:00
Update patch version to 1.0.33 as a mirror of 0.7.33
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ua-parser-js",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.33",
|
||||
"authors": [
|
||||
"Faisal Salman <f@faisalman.com>"
|
||||
],
|
||||
|
||||
4
dist/ua-parser.min.js
vendored
4
dist/ua-parser.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/ua-parser.pack.js
vendored
4
dist/ua-parser.pack.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'faisalman:ua-parser-js',
|
||||
version: '1.0.32',
|
||||
version: '1.0.33',
|
||||
summary: 'Lightweight JavaScript-based user-agent string parser',
|
||||
git: 'https://github.com/faisalman/ua-parser-js.git',
|
||||
documentation: 'readme.md'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"title": "UAParser.js",
|
||||
"name": "ua-parser-js",
|
||||
"version": "1.0.32",
|
||||
"version": "1.0.33",
|
||||
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)",
|
||||
"description": "Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment",
|
||||
"keywords": [
|
||||
|
||||
@@ -36,7 +36,7 @@ Like so:
|
||||
```js
|
||||
let parser = new UAParser("user-agent"); // you need to pass the user-agent for nodejs
|
||||
console.log(parser); // {}
|
||||
let parserResults = parser.getResults();
|
||||
let parserResults = parser.getResult();
|
||||
console.log(parserResults);
|
||||
/** {
|
||||
"ua": "",
|
||||
@@ -48,7 +48,7 @@ console.log(parserResults);
|
||||
} */
|
||||
```
|
||||
|
||||
When you call UAParser without the `new` keyword, it will automatically call `getResults()` function and return the parsed results.
|
||||
When you call UAParser without the `new` keyword, it will automatically call `getResult()` function and return the parsed results.
|
||||
* `UAParser([uastring][,extensions])`
|
||||
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
/* UAParser.js v1.0.32
|
||||
/* UAParser.js v1.0.33
|
||||
Copyright © 2012-2021 Faisal Salman <f@faisalman.com>
|
||||
MIT License *//*
|
||||
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
|
||||
@@ -17,7 +17,7 @@
|
||||
/////////////
|
||||
|
||||
|
||||
var LIBVERSION = '1.0.32',
|
||||
var LIBVERSION = '1.0.33',
|
||||
EMPTY = '',
|
||||
UNKNOWN = '?',
|
||||
FUNC_TYPE = 'function',
|
||||
@@ -93,7 +93,7 @@
|
||||
},
|
||||
trim = function (str, len) {
|
||||
if (typeof(str) === STR_TYPE) {
|
||||
str = str.replace(/^\s\s*/, EMPTY).replace(/\s\s*$/, EMPTY);
|
||||
str = str.replace(/^\s\s*/, EMPTY);
|
||||
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
||||
}
|
||||
};
|
||||
@@ -330,7 +330,10 @@
|
||||
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
||||
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir/Obigo/Mosaic/Go/ICE/UP.Browser
|
||||
/(links) \(([\w\.]+)/i // Links
|
||||
], [NAME, VERSION]
|
||||
], [NAME, VERSION], [
|
||||
|
||||
/(cobalt)\/([\w\.]+)/i // Cobalt
|
||||
], [NAME, [VERSION, /master.|lts./, ""]]
|
||||
],
|
||||
|
||||
cpu : [[
|
||||
@@ -387,6 +390,8 @@
|
||||
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
||||
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
||||
], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [
|
||||
/(macintosh);/i
|
||||
], [MODEL, [VENDOR, APPLE]], [
|
||||
|
||||
// Huawei
|
||||
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
||||
|
||||
@@ -1591,5 +1591,41 @@
|
||||
"version" : "15.6,2",
|
||||
"major" : "15"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Cobalt 23 Master",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.master.0.0-devel (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15",
|
||||
"expect" : {
|
||||
"name" : "Cobalt",
|
||||
"version": "23.0.0",
|
||||
"major" : "23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Cobalt 23 LTS",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/23.lts.1.0-qa (unlike Gecko) v8/8.8.278.8-jit gles Starboard/15",
|
||||
"expect" : {
|
||||
"name" : "Cobalt",
|
||||
"version": "23.1.0",
|
||||
"major" : "23"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Cobalt 11",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/11.0-qa (unlike Gecko) Starboard/6",
|
||||
"expect" : {
|
||||
"name" : "Cobalt",
|
||||
"version": "11.0",
|
||||
"major" : "11"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc" : "Cobalt 9",
|
||||
"ua" : "Mozilla/5.0 (X11; Linux x86_64) Cobalt/9.0-qa (unlike Gecko) Starboard/4",
|
||||
"expect" : {
|
||||
"name" : "Cobalt",
|
||||
"version": "9.0",
|
||||
"major" : "9"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -754,6 +754,15 @@
|
||||
"type": "mobile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Apple Desktop",
|
||||
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15",
|
||||
"expect": {
|
||||
"vendor": "Apple",
|
||||
"model": "Macintosh",
|
||||
"type": "undefined"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "iPad using UCBrowser",
|
||||
"ua": "Mozilla/5.0 (iPad; U; CPU OS 11_2 like Mac OS X; zh-CN; iPad5,3) AppleWebKit/534.46 (KHTML, like Gecko) UCBrowser/3.0.1.776 U3/ Mobile/10A403 Safari/7543.48.3",
|
||||
|
||||
Reference in New Issue
Block a user