UNPKG

320 BJavaScriptView Raw
1'use strict';
2
3var global = require('es5-ext/global')
4 , polyfill = require('../polyfill');
5
6module.exports = function (t, a) {
7 var cache;
8 a(typeof t(), 'boolean');
9 cache = global.WeakMap;
10 global.WeakMap = polyfill;
11 a(t(), true);
12 if (cache === undefined) delete global.WeakMap;
13 else global.WeakMap = cache;
14};