2016-10-10 03:43:44 +02:00
|
|
|
'use strict';
|
2017-04-20 03:09:25 +02:00
|
|
|
var strong = require('./$.collection-strong');
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
// 23.2 Set Objects
|
2017-04-20 03:09:25 +02:00
|
|
|
require('./$.collection')('Set', function(get){
|
2016-10-10 03:43:44 +02:00
|
|
|
return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
|
|
}, {
|
|
|
|
// 23.2.3.1 Set.prototype.add(value)
|
|
|
|
add: function add(value){
|
|
|
|
return strong.def(this, value = value === 0 ? 0 : value, value);
|
|
|
|
}
|
|
|
|
}, strong);
|