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