/
lostSun
/
project-client-server-apps
Обзор
Документация
Войти
/
lostSun
/
project-client-server-apps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/core-js/modules/es.set.intersection.v2.js
18 строк
799 B
1lostsun
initial commit
05 май 2025, 11:35
05 май 2025, 11:35
fe8f535
Код
Авторство
О чём код?
'use strict'; var $ = require('../internals/export'); var fails = require('../internals/fails'); var intersection = require('../internals/set-intersection'); var setMethodAcceptSetLike = require('../internals/set-method-accept-set-like'); var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) { return result.size === 2 && result.has(1) && result.has(2); }) || fails(function () { // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2'; }); // `Set.prototype.intersection` method // https://tc39.es/ecma262/#sec-set.prototype.intersection $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { intersection: intersection });