1
0
mirror of https://github.com/lancedikson/bowser synced 2026-09-23 20:44:24 +00:00

Add file extensions to imports

Add ES6 style export to utils and change related utils imports
Update eslint rule for import extensions
This commit is contained in:
Nick Tipping
2019-02-14 16:06:14 +00:00
parent 91fa272785
commit bf067ec992
9 changed files with 111 additions and 151 deletions

View File

@@ -1,4 +1,4 @@
import { getFirstMatch } from './utils';
import Utils from './utils.js';
const TYPES_LABELS = {
tablet: 'tablet',
@@ -27,7 +27,7 @@ export default [
{
test: [/huawei/i],
describe(ua) {
const model = getFirstMatch(/(can-l01)/i, ua) && 'Nova';
const model = Utils.getFirstMatch(/(can-l01)/i, ua) && 'Nova';
const platform = {
type: TYPES_LABELS.mobile,
vendor: 'Huawei',
@@ -103,7 +103,7 @@ export default [
return iDevice && !likeIDevice;
},
describe(ua) {
const model = getFirstMatch(/(ipod|iphone)/i, ua);
const model = Utils.getFirstMatch(/(ipod|iphone)/i, ua);
return {
type: TYPES_LABELS.mobile,
vendor: 'Apple',