aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/services/BrowsersListService.js
blob: 77f217a86ac290b69eb6fc16be659d1695fc5575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/**
 * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

import { getUserAgentRegex } from 'browserslist-useragent-regexp'
// eslint-disable-next-line n/no-extraneous-import
import browserslist from 'browserslist'
import browserslistConfig from '@nextcloud/browserslist-config'

// Generate a regex that matches user agents to detect incompatible browsers
export const supportedBrowsersRegExp = getUserAgentRegex({ allowHigherVersions: true, browsers: browserslistConfig })
export const supportedBrowsers = browserslist(browserslistConfig)