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:
@@ -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;
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user