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

15 lines
481 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 strong = require('./_collection-strong');
2017-08-14 05:01:11 +02:00
var validate = require('./_validate-collection');
var SET = 'Set';
2016-10-10 03:43:44 +02:00
// 23.2 Set Objects
2017-08-14 05:01:11 +02:00
module.exports = require('./_collection')(SET, function (get) {
return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
2016-10-10 03:43:44 +02:00
}, {
// 23.2.3.1 Set.prototype.add(value)
2017-08-14 05:01:11 +02:00
add: function add(value) {
return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
2016-10-10 03:43:44 +02:00
}
2017-08-14 05:01:11 +02:00
}, strong);