@whitesev/utils 2.11.1 → 2.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -237,7 +237,7 @@ const clearTimeout$1 = (timerId) => loadOrReturnBroker().clearTimeout(timerId);
237
237
  const setInterval$1 = (...args) => loadOrReturnBroker().setInterval(...args);
238
238
  const setTimeout$1 = (...args) => loadOrReturnBroker().setTimeout(...args);
239
239
 
240
- const version = "2.11.1";
240
+ const version = "2.11.2";
241
241
 
242
242
  /* eslint-disable */
243
243
  // ==UserScript==
@@ -7989,9 +7989,22 @@ class Utils {
7989
7989
  return result;
7990
7990
  }
7991
7991
  else {
7992
- return Array.from(uniqueArrayData).filter((item) => !Array.from(compareArrayData).some(function (item2) {
7993
- return compareFun(item, item2);
7994
- }));
7992
+ const compareSet = new Set(compareArrayData);
7993
+ const result = [];
7994
+ for (let i = 0; i < uniqueArrayData.length; i++) {
7995
+ const item = uniqueArrayData[i];
7996
+ let flag = false;
7997
+ for (const compareItem of compareSet) {
7998
+ if (compareFun(item, compareItem)) {
7999
+ flag = true;
8000
+ break;
8001
+ }
8002
+ }
8003
+ if (!flag) {
8004
+ result.push(item);
8005
+ }
8006
+ }
8007
+ return result;
7995
8008
  }
7996
8009
  }
7997
8010
  /**