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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user