1
0
mirror of https://github.com/lancedikson/bowser synced 2026-09-27 06:15:35 +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

@@ -12,6 +12,22 @@ const TYPES_LABELS = {
*/
export default [
/* Huawei */
{
test: [/huawei/i],
describe(ua) {
const model = getFirstMatch(/(can\-l01)/i, ua) && "Nova";
const platform = {
type: TYPES_LABELS.mobile,
vendor: 'Huawei'
};
if (model) {
platform.model = model;
}
return platform;
},
},
/* Nexus Tablet */
{
test: [/nexus\s*(?:7|8|9|10).*/i],