wallet-core/node_modules/core-js/modules/es6.weak-set.js

15 lines
473 B
JavaScript
Raw Normal View History

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