source: imaps-frontend/node_modules/core-js/internals/set-union.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 583 bytes
Line 
1'use strict';
2var aSet = require('../internals/a-set');
3var add = require('../internals/set-helpers').add;
4var clone = require('../internals/set-clone');
5var getSetRecord = require('../internals/get-set-record');
6var iterateSimple = require('../internals/iterate-simple');
7
8// `Set.prototype.union` method
9// https://github.com/tc39/proposal-set-methods
10module.exports = function union(other) {
11 var O = aSet(this);
12 var keysIter = getSetRecord(other).getIterator();
13 var result = clone(O);
14 iterateSimple(keysIter, function (it) {
15 add(result, it);
16 });
17 return result;
18};
Note: See TracBrowser for help on using the repository browser.