source: imaps-frontend/node_modules/core-js/internals/set-is-superset-of.js

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

F4 Finalna Verzija

  • Property mode set to 100644
File size: 776 bytes
Line 
1'use strict';
2var aSet = require('../internals/a-set');
3var has = require('../internals/set-helpers').has;
4var size = require('../internals/set-size');
5var getSetRecord = require('../internals/get-set-record');
6var iterateSimple = require('../internals/iterate-simple');
7var iteratorClose = require('../internals/iterator-close');
8
9// `Set.prototype.isSupersetOf` method
10// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
11module.exports = function isSupersetOf(other) {
12 var O = aSet(this);
13 var otherRec = getSetRecord(other);
14 if (size(O) < otherRec.size) return false;
15 var iterator = otherRec.getIterator();
16 return iterateSimple(iterator, function (e) {
17 if (!has(O, e)) return iteratorClose(iterator, 'normal', false);
18 }) !== false;
19};
Note: See TracBrowser for help on using the repository browser.