2016-10-10 03:43:44 +02:00
|
|
|
'use strict';
|
2017-04-20 03:09:25 +02:00
|
|
|
var weak = require('./$.collection-weak');
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
// 23.4 WeakSet Objects
|
2017-04-20 03:09:25 +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);
|