- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
19 lines
587 B
JavaScript
19 lines
587 B
JavaScript
'use strict';
|
|
var aSet = require('../internals/a-set');
|
|
var add = require('../internals/set-helpers').add;
|
|
var clone = require('../internals/set-clone');
|
|
var getSetRecord = require('../internals/get-set-record');
|
|
var iterateSimple = require('../internals/iterate-simple');
|
|
|
|
// `Set.prototype.union` method
|
|
// https://tc39.es/ecma262/#sec-set.prototype.union
|
|
module.exports = function union(other) {
|
|
var O = aSet(this);
|
|
var keysIter = getSetRecord(other).getIterator();
|
|
var result = clone(O);
|
|
iterateSimple(keysIter, function (it) {
|
|
add(result, it);
|
|
});
|
|
return result;
|
|
};
|