2016-10-10 03:43:44 +02:00
|
|
|
'use strict';
|
2017-05-27 17:36:13 +02:00
|
|
|
var weak = require('./_collection-weak');
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
// 23.4 WeakSet Objects
|
2017-05-27 17:36:13 +02:00
|
|
|
require('./_collection')('WeakSet', function(get){
|
2016-10-10 03:43:44 +02:00
|
|
|
return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
|
|
}, {
|
|
|
|
// 23.4.3.1 WeakSet.prototype.add(value)
|
|
|
|
add: function add(value){
|
|
|
|
return weak.def(this, value, true);
|
|
|
|
}
|
|
|
|
}, weak, false, true);
|