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

Change descriptors naming and add some information about them

This commit is contained in:
Denis Demchenko
2017-05-18 22:57:18 +03:00
parent 8808d5747b
commit 8b37abf268
3 changed files with 75 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ import { getFirstMatch } from './utils';
export default [
{
test: [/windows phone/i],
detect(ua) {
describe(ua) {
const version = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, ua);
return {
name: 'Windows Phone',
@@ -13,7 +13,7 @@ export default [
},
{
test: [/macintosh/i],
detect(ua) {
describe(ua) {
const version = getFirstMatch(/mac os x (\d+([_\s]\d+)*)/i, ua).replace(/[_\s]/g, '.');
return {
name: 'macOS',