main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
799 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var fails = require('../internals/fails');
|
---|
| 4 | var intersection = require('../internals/set-intersection');
|
---|
| 5 | var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like');
|
---|
| 6 |
|
---|
| 7 | var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) {
|
---|
| 8 | return result.size === 2 && result.has(1) && result.has(2);
|
---|
| 9 | }) || fails(function () {
|
---|
| 10 | // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing
|
---|
| 11 | return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
|
---|
| 12 | });
|
---|
| 13 |
|
---|
| 14 | // `Set.prototype.intersection` method
|
---|
| 15 | // https://tc39.es/ecma262/#sec-set.prototype.intersection
|
---|
| 16 | $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
|
---|
| 17 | intersection: intersection
|
---|
| 18 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.