rx/presenters

View on GitHub
views/mdc/assets/js/utils/compatibility.js

Summary

Maintainability
A
0 mins
Test Coverage
import { detect } from 'detect-browser';
import config from '../config';

const incompatibleList = config.get('compatibility.incompatibleBrowsers', []);
const browser = detect();
const name = browser ? browser.name : 'unknown';
const isCompatible = browser && incompatibleList.indexOf(name) < 0;

export default isCompatible;