source: imaps-frontend/node_modules/core-js/internals/set-is-subset-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: 578 bytes
Line 
1'use strict';
2var aSet = require('../internals/a-set');
3var size = require('../internals/set-size');
4var iterate = require('../internals/set-iterate');
5var getSetRecord = require('../internals/get-set-record');
6
7// `Set.prototype.isSubsetOf` method
8// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
9module.exports = function isSubsetOf(other) {
10 var O = aSet(this);
11 var otherRec = getSetRecord(other);
12 if (size(O) > otherRec.size) return false;
13 return iterate(O, function (e) {
14 if (!otherRec.includes(e)) return false;
15 }, true) !== false;
16};
Note: See TracBrowser for help on using the repository browser.