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

fixing ES6 Module import for BROWSER_ALIAS_MAP

This commit is contained in:
Marco Starker 2019-04-18 13:46:30 +02:00
parent b55b0bb540
commit 0f20a43f0a
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,6 @@
// NOTE: this list must be up-to-date with browsers listed in // NOTE: this list must be up-to-date with browsers listed in
// test/acceptance/useragentstrings.yml // test/acceptance/useragentstrings.yml
const BROWSER_ALIASES_MAP = { export default {
'Amazon Silk': 'amazon_silk', 'Amazon Silk': 'amazon_silk',
'Android Browser': 'android', 'Android Browser': 'android',
Bada: 'bada', Bada: 'bada',
@ -35,8 +35,4 @@ const BROWSER_ALIASES_MAP = {
'WebOS Browser': 'webos', 'WebOS Browser': 'webos',
WeChat: 'wechat', WeChat: 'wechat',
'Yandex Browser': 'yandex', 'Yandex Browser': 'yandex',
}; }
module.exports = {
BROWSER_ALIASES_MAP,
};

View File

@ -1,4 +1,4 @@
import { BROWSER_ALIASES_MAP } from './constants.js'; import BROWSER_ALIASES_MAP from './constants.js';
export default class Utils { export default class Utils {
/** /**

View File

@ -1,5 +1,5 @@
import test from 'ava'; import test from 'ava';
import { BROWSER_ALIASES_MAP } from '../../src/constants'; import BROWSER_ALIASES_MAP from '../../src/constants';
test('check duplicate aliases', (t) => { test('check duplicate aliases', (t) => {
const aliasesList = Object.keys(BROWSER_ALIASES_MAP).map(value => (BROWSER_ALIASES_MAP[value])); const aliasesList = Object.keys(BROWSER_ALIASES_MAP).map(value => (BROWSER_ALIASES_MAP[value]));