source: trip-planner-front/node_modules/core-js/modules/esnext.set.is-subset-of.js@ b738035

Last change on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1022 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var IS_PURE = require('../internals/is-pure');
4var getBuiltIn = require('../internals/get-built-in');
5var anObject = require('../internals/an-object');
6var aFunction = require('../internals/a-function');
7var getIterator = require('../internals/get-iterator');
8var iterate = require('../internals/iterate');
9
10// `Set.prototype.isSubsetOf` method
11// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
12$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
13 isSubsetOf: function isSubsetOf(iterable) {
14 var iterator = getIterator(this);
15 var otherSet = anObject(iterable);
16 var hasCheck = otherSet.has;
17 if (typeof hasCheck != 'function') {
18 otherSet = new (getBuiltIn('Set'))(iterable);
19 hasCheck = aFunction(otherSet.has);
20 }
21 return !iterate(iterator, function (value, stop) {
22 if (hasCheck.call(otherSet, value) === false) return stop();
23 }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped;
24 }
25});
Note: See TracBrowser for help on using the repository browser.