Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

set.prototype.intersection

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

set.prototype.intersection - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

11

aos/SetDataHas.js

@@ -10,10 +10,13 @@ 'use strict';

module.exports = function SetDataHas(resultSetData, value) {
if (!IsArray(resultSetData)) {
throw new $TypeError('`resultSetData` must be a List');
module.exports = function SetDataHas(setData, value) {
if (!IsArray(setData)) {
throw new $TypeError('`setData` must be a List');
}
return some(resultSetData, function (e) {
// if (SetDataIndex(setData, value) === 'NOT-FOUND') { return false; } // step 1
// return true; // step 2
return some(setData, function (e) {
return SameValueZero(e, value);
});
};

@@ -8,2 +8,10 @@ # Changelog

## [v1.1.5](https://github.com/es-shims/Set.prototype.intersection/compare/v1.1.4...v1.1.5) - 2024-04-06
### Commits
- [Refactor] update spec from https://github.com/tc39/ecma262/pull/3306 [`a1454f4`](https://github.com/es-shims/Set.prototype.intersection/commit/a1454f46d8e5a0a48878cfa25b8ec48712fb32d0)
- [Deps] update `es-abstract` [`8be383a`](https://github.com/es-shims/Set.prototype.intersection/commit/8be383a1cb3ce9e2442a501cc3f4d6cf8fa68017)
- [Dev Deps] update `@es-shims/api` [`76cd036`](https://github.com/es-shims/Set.prototype.intersection/commit/76cd03610b0692e665394173faad03733785bda8)
## [v1.1.4](https://github.com/es-shims/Set.prototype.intersection/compare/v1.1.3...v1.1.4) - 2024-03-19

@@ -10,0 +18,0 @@

@@ -12,6 +12,4 @@ 'use strict';

var GetSetRecord = require('./aos/GetSetRecord');
var IteratorStep = require('es-abstract/2024/IteratorStep');
var IteratorValue = require('es-abstract/2024/IteratorValue');
var IteratorStepValue = require('es-abstract/2024/IteratorStepValue');
var SetDataHas = require('./aos/SetDataHas');
var SetDataSize = require('./aos/SetDataSize');
var ToBoolean = require('es-abstract/2024/ToBoolean');

@@ -28,2 +26,3 @@

var $setAdd = tools.add;
var $setSize = tools.size;

@@ -45,3 +44,3 @@ var $push = callBound('Array.prototype.push');

var thisSize = SetDataSize(O); // step 5.a
var thisSize = $setSize(O); // SetDataSize(O.[[SetData]]); // step 5.a
if (thisSize <= otherRec['[[Size]]']) { // step 5

@@ -64,15 +63,13 @@ var index = 0; // step 5.b

var keysIter = GetIteratorFromMethod(otherRec['[[Set]]'], otherRec['[[Keys]]']); // step 6.a
var next = true; // step 6.b
while (next) { // step 6.c
next = IteratorStep(keysIter); // step 6.c.i
if (next) { // step 6.c.ii
var nextValue = IteratorValue(next); // step 6.c.ii.1
if (nextValue === 0) { // step 6.c.ii.2
nextValue = +0;
var next; // step 6.b
while (!keysIter['[[Done]]']) { // step 6.c
next = IteratorStepValue(keysIter); // step 6.c.i
if (!keysIter['[[Done]]']) { // step 6.c.ii
if (next === 0) { // step 6.c.ii.1
next = +0;
}
var alreadyInResult = SetDataHas(resultSetData, nextValue); // step 6.c.ii.4
var inThis = $setHas(O, nextValue); // step 6.c.ii.5
if (!alreadyInResult && inThis) { // step 6.c.ii.6
$push(resultSetData, nextValue); // step 6.c.ii.6.a
var alreadyInResult = SetDataHas(resultSetData, next); // step 6.c.ii.3
var inThis = $setHas(O, next); // step 6.c.ii.4
if (!alreadyInResult && inThis) { // step 6.c.ii.5
$push(resultSetData, next); // step 6.c.ii.5.a
}

@@ -79,0 +76,0 @@ }

{
"name": "set.prototype.intersection",
"version": "1.1.4",
"version": "1.1.5",
"description": "An ESnext spec-compliant `Set.prototype.intersection` shim/polyfill/replacement that works as far down as ES3",

@@ -56,3 +56,3 @@ "main": "index.js",

"define-properties": "^1.2.1",
"es-abstract": "^1.23.2",
"es-abstract": "^1.23.3",
"es-errors": "^1.3.0",

@@ -64,3 +64,3 @@ "es-set": "^1.1.1",

"devDependencies": {
"@es-shims/api": "^2.4.2",
"@es-shims/api": "^2.5.0",
"@ljharb/eslint-config": "^21.1.0",

@@ -67,0 +67,0 @@ "aud": "^2.0.4",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc