File size: 335 Bytes
b5ea024
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";

var globalObj = require("es5-ext/global")
  , polyfill  = require("../polyfill");

module.exports = function (t, a) {
	var cache;

	a(typeof t(), "boolean");
	cache = globalObj.WeakMap;
	globalObj.WeakMap = polyfill;
	a(t(), true);
	if (cache === undefined) delete globalObj.WeakMap;
	else globalObj.WeakMap = cache;
};