browser.js 902 B

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