1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Fix macOS version parsing

This commit is contained in:
Denis Demchenko 2017-08-17 23:48:44 +03:00
parent b2aded435b
commit 5c753edb75
2 changed files with 10 additions and 10 deletions

View File

@ -50,7 +50,7 @@ export default [
{ {
test: [/macintosh/i], test: [/macintosh/i],
describe(ua) { describe(ua) {
const version = getFirstMatch(/mac os x (\d+(\.\d+)*)/i, ua).replace(/[_\s]/g, '.'); const version = getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, '.');
return { return {
name: 'macOS', name: 'macOS',
version version

View File

@ -192,7 +192,7 @@
version: "11.0.696.57" version: "11.0.696.57"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.6.7"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -309,7 +309,7 @@
version: "1.0.22.153_10033210" version: "1.0.22.153_10033210"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.6.3"
platform: platform:
type: "tablet" type: "tablet"
vendor: "Amazon" vendor: "Amazon"
@ -591,7 +591,7 @@
version: "15.4.2272.3420" version: "15.4.2272.3420"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.10.3"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -620,7 +620,7 @@
version: "5.1.7" version: "5.1.7"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.6.8"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -635,7 +635,7 @@
version: "5.0.5" version: "5.0.5"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.6.7"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -693,7 +693,7 @@
version: "4.0.4" version: "4.0.4"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.6.1"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -708,7 +708,7 @@
version: "3.2.3" version: "3.2.3"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.5.7"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"
@ -786,7 +786,7 @@
version: "3.1" version: "3.1"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.5.2"
platform: platform:
type: "mobile" type: "mobile"
vendor: "Apple" vendor: "Apple"
@ -2073,7 +2073,7 @@
version: "1.0.303.52" version: "1.0.303.52"
os: os:
name: "macOS" name: "macOS"
version: "10" version: "10.11.1"
platform: platform:
type: "desktop" type: "desktop"
vendor: "Apple" vendor: "Apple"