blob: e082b42bf2ffaa0104c8a974e64372cf00de5468 [file] [log] [blame]
/* global Map,Set,Symbol */
// Based on https://kangax.github.io/compat-table/es6/ we can sniff out
// incomplete Map/Set implementations which would otherwise cause our tests to fail.
// Notably they fail in IE11 and iOS 8.4, which this prevents.
function supportsMapAndSet() {
if (typeof Symbol === 'undefined' || typeof Map === 'undefined' || typeof Set === 'undefined') {
return false;
}
var prop = Object.getOwnPropertyDescriptor(Map, Symbol.species);
return prop && 'get' in prop && Map[Symbol.species] === Map;
}
export default supportsMapAndSet;