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