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

Support Android version names, Recognise Huawei devices

This commit is contained in:
Robert Sandell
2018-12-30 09:03:08 +02:00
parent 70a4604873
commit f338045df7
5 changed files with 106 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import {
getFirstMatch,
getWindowsVersionName,
getAndroidVersionName,
} from './utils';
export default [
@@ -65,10 +66,15 @@ export default [
},
describe(ua) {
const version = getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, ua);
return {
const versionName = getAndroidVersionName(version);
const os = {
name: 'Android',
version,
version
};
if (versionName) {
os.versionName = versionName;
}
return os;
},
},