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:
713 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var IS_PURE = require('../internals/is-pure');
|
---|
4 | var anObject = require('../internals/an-object');
|
---|
5 | var aFunction = require('../internals/a-function');
|
---|
6 | var iterate = require('../internals/iterate');
|
---|
7 |
|
---|
8 | // `Set.prototype.isSupersetOf` method
|
---|
9 | // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
|
---|
10 | $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
|
---|
11 | isSupersetOf: function isSupersetOf(iterable) {
|
---|
12 | var set = anObject(this);
|
---|
13 | var hasCheck = aFunction(set.has);
|
---|
14 | return !iterate(iterable, function (value, stop) {
|
---|
15 | if (hasCheck.call(set, value) === false) return stop();
|
---|
16 | }, { INTERRUPTED: true }).stopped;
|
---|
17 | }
|
---|
18 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.