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],
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 {
name: 'macOS',
version

View File

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