UNPKG

902 BJavaScriptView Raw
1var BrowserslistError = require('./error')
2
3function noop () { }
4
5module.exports = {
6 loadQueries: function loadQueries () {
7 throw new BrowserslistError(
8 'Sharable configs are not supported in client-side build of Browserslist')
9 },
10
11 getStat: function getStat (opts) {
12 return opts.stats
13 },
14
15 loadConfig: function loadConfig (opts) {
16 if (opts.config) {
17 throw new BrowserslistError(
18 'Browserslist config are not supported in client-side build')
19 }
20 },
21
22 loadCountry: function loadCountry () {
23 throw new BrowserslistError(
24 'Country statistics is not supported ' +
25 'in client-side build of Browserslist')
26 },
27
28 currentNode: function currentNode (resolve, context) {
29 return resolve(['maintained node versions'], context)[0]
30 },
31
32 parseConfig: noop,
33
34 readConfig: noop,
35
36 findConfig: noop,
37
38 clearCaches: noop,
39
40 oldDataWarning: noop
41}