1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

TYPES → TYPES_LABELS

This commit is contained in:
Denis Demchenko 2017-12-20 22:48:23 +02:00
parent bee21ea5c3
commit b1170af9d8

View File

@ -2,7 +2,7 @@ import {
getFirstMatch getFirstMatch
} from './utils'; } from './utils';
const TYPES = { const TYPES_LABELS = {
tablet: 'tablet', tablet: 'tablet',
mobile: 'mobile', mobile: 'mobile',
desktop: 'desktop' desktop: 'desktop'
@ -19,7 +19,7 @@ export default [
test: [/nexus\s*[0-9]+/i], test: [/nexus\s*[0-9]+/i],
describe() { describe() {
return { return {
type: TYPES.tablet, type: TYPES_LABELS.tablet,
vendor: 'Nexus', vendor: 'Nexus',
}; };
} }
@ -30,7 +30,7 @@ export default [
test: [/ipad/i], test: [/ipad/i],
describe() { describe() {
return { return {
type: TYPES.tablet, type: TYPES_LABELS.tablet,
vendor: 'Apple', vendor: 'Apple',
model: 'iPad' model: 'iPad'
} }
@ -42,7 +42,7 @@ export default [
test: [/kftt build/i], test: [/kftt build/i],
describe() { describe() {
return { return {
type: TYPES.tablet, type: TYPES_LABELS.tablet,
vendor: 'Amazon', vendor: 'Amazon',
model: 'Kindle Fire HD 7' model: 'Kindle Fire HD 7'
} }
@ -54,7 +54,7 @@ export default [
test: [/silk/i], test: [/silk/i],
describe() { describe() {
return { return {
type: TYPES.tablet, type: TYPES_LABELS.tablet,
vendor: 'Amazon' vendor: 'Amazon'
} }
} }
@ -65,7 +65,7 @@ export default [
test: [/tablet/i], test: [/tablet/i],
describe() { describe() {
return { return {
type: TYPES.tablet type: TYPES_LABELS.tablet
}; };
} }
}, },
@ -80,7 +80,7 @@ export default [
describe(ua) { describe(ua) {
const model = getFirstMatch(/(ipod|iphone)/i, ua); const model = getFirstMatch(/(ipod|iphone)/i, ua);
return { return {
type: TYPES.mobile, type: TYPES_LABELS.mobile,
vendor: 'Apple', vendor: 'Apple',
model: model model: model
}; };
@ -92,7 +92,7 @@ export default [
test: [/nexus\s*[0-6]\s*/i, /galaxy nexus/i], test: [/nexus\s*[0-6]\s*/i, /galaxy nexus/i],
describe() { describe() {
return { return {
type: TYPES.mobile, type: TYPES_LABELS.mobile,
vendor: 'Nexus' vendor: 'Nexus'
}; };
} }
@ -103,7 +103,7 @@ export default [
test: [/[^-]mobi/i], test: [/[^-]mobi/i],
describe() { describe() {
return { return {
type: TYPES.mobile type: TYPES_LABELS.mobile
}; };
} }
}, },
@ -115,7 +115,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.mobile, type: TYPES_LABELS.mobile,
vendor: 'BlackBerry' vendor: 'BlackBerry'
}; };
} }
@ -128,7 +128,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.mobile type: TYPES_LABELS.mobile
} }
} }
}, },
@ -140,7 +140,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.mobile, type: TYPES_LABELS.mobile,
vendor: 'Microsoft' vendor: 'Microsoft'
} }
} }
@ -154,7 +154,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.tablet type: TYPES_LABELS.tablet
} }
} }
}, },
@ -166,7 +166,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.mobile type: TYPES_LABELS.mobile
} }
} }
}, },
@ -178,7 +178,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.desktop, type: TYPES_LABELS.desktop,
vendor: 'Apple' vendor: 'Apple'
}; };
} }
@ -191,7 +191,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.desktop type: TYPES_LABELS.desktop
} }
} }
}, },
@ -203,7 +203,7 @@ export default [
}, },
describe() { describe() {
return { return {
type: TYPES.desktop type: TYPES_LABELS.desktop
} }
} }
} }