1
0
mirror of https://github.com/lancedikson/bowser synced 2026-03-02 03:40:27 +00:00

Add detection of macOS version names

This commit is contained in:
Jörg Leis
2019-07-17 13:14:23 +02:00
parent 72b59a9208
commit b298e8d866
3 changed files with 76 additions and 1 deletions

View File

@@ -46,10 +46,16 @@ export default [
test: [/macintosh/i],
describe(ua) {
const version = Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, '.');
return {
const versionName = Utils.getMacOSVersionName(version);
const os = {
name: OS_MAP.MacOS,
version,
};
if (versionName) {
os.versionName = versionName;
}
return os;
},
},