map-tojson
Version:
ES7 Proposal: Map#toJSON https://github.com/DavidBruant/Map-Set.prototype.toJSON
12 lines (9 loc) • 331 B
JavaScript
var GetIntrinsic = require('es-abstract/GetIntrinsic');
var $Map = GetIntrinsic('%Map%', true);
var $TypeError = GetIntrinsic('%TypeError%');
module.exports = function requireGlobalMap() {
if (!$Map) {
throw new $TypeError('Map.prototype.toJSON requires Map (either native, or polyfilled with es6-shim)');
}
};
;