StaticPageHelpers.js 651 B

12345678910111213141516171819202122232425262728293031
  1. /* eslint-disable
  2. max-len,
  3. */
  4. // TODO: This file was created by bulk-decaffeinate.
  5. // Fix any style issues and re-enable lint.
  6. /*
  7. * decaffeinate suggestions:
  8. * DS102: Remove unnecessary code created because of implicit returns
  9. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  10. */
  11. const extensionsToProxy = [
  12. '.png',
  13. '.xml',
  14. '.jpeg',
  15. '.json',
  16. '.zip',
  17. '.eps',
  18. '.gif',
  19. '.jpg',
  20. ]
  21. const _ = require('lodash')
  22. module.exports = {
  23. shouldProxy(url) {
  24. const shouldProxy = _.find(
  25. extensionsToProxy,
  26. extension => url.indexOf(extension) !== -1
  27. )
  28. return shouldProxy
  29. },
  30. }