You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
350 B
11 lines
350 B
'use strict';
|
|
var tryToString = require('../internals/try-to-string');
|
|
|
|
var $TypeError = TypeError;
|
|
|
|
// Perform ? RequireInternalSlot(M, [[WeakMapData]])
|
|
module.exports = function (it) {
|
|
if (typeof it == 'object' && 'has' in it && 'get' in it && 'set' in it && 'delete') return it;
|
|
throw new $TypeError(tryToString(it) + ' is not a weakmap');
|
|
};
|