massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / esnext.set.is-subset-of.js
1 'use strict';
2 var IS_PURE = require('../internals/is-pure');
3 var $ = require('../internals/export');
4 var getBuiltIn = require('../internals/get-built-in');
5 var call = require('../internals/function-call');
6 var aCallable = require('../internals/a-callable');
7 var isCallable = require('../internals/is-callable');
8 var anObject = require('../internals/an-object');
9 var getIterator = require('../internals/get-iterator');
10 var iterate = require('../internals/iterate');
11
12 // `Set.prototype.isSubsetOf` method
13 // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
14 $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
15   isSubsetOf: function isSubsetOf(iterable) {
16     var iterator = getIterator(this);
17     var otherSet = anObject(iterable);
18     var hasCheck = otherSet.has;
19     if (!isCallable(hasCheck)) {
20       otherSet = new (getBuiltIn('Set'))(iterable);
21       hasCheck = aCallable(otherSet.has);
22     }
23     return !iterate(iterator, function (value, stop) {
24       if (call(hasCheck, otherSet, value) === false) return stop();
25     }, { IS_ITERATOR: true, INTERRUPTED: true }).stopped;
26   }
27 });