index.js 396 B

1234567891011121314151617
  1. /**
  2. * Module exports.
  3. *
  4. * Logic borrowed from Modernizr:
  5. *
  6. * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js
  7. */
  8. try {
  9. module.exports = typeof XMLHttpRequest !== 'undefined' &&
  10. 'withCredentials' in new XMLHttpRequest();
  11. } catch (err) {
  12. // if XMLHttp support is disabled in IE then it will throw
  13. // when trying to create
  14. module.exports = false;
  15. }