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.
16 lines
513 B
16 lines
513 B
1 year ago
|
'use strict';
|
||
|
var $ = require('../internals/export');
|
||
|
var aWeakSet = require('../internals/a-weak-set');
|
||
|
var add = require('../internals/weak-set-helpers').add;
|
||
|
|
||
|
// `WeakSet.prototype.addAll` method
|
||
|
// https://github.com/tc39/proposal-collection-methods
|
||
|
$({ target: 'WeakSet', proto: true, real: true, forced: true }, {
|
||
|
addAll: function addAll(/* ...elements */) {
|
||
|
var set = aWeakSet(this);
|
||
|
for (var k = 0, len = arguments.length; k < len; k++) {
|
||
|
add(set, arguments[k]);
|
||
|
} return set;
|
||
|
}
|
||
|
});
|