Socket
Socket
Sign inDemoInstall

es-toolkit

Package Overview
Dependencies
Maintainers
2
Versions
722
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-toolkit - npm Package Compare versions

Comparing version 1.3.1-dev.79 to 1.3.1-dev.80

dist/chunk-AM2EGFCU.mjs

11

dist/array/index.js

@@ -240,3 +240,3 @@ "use strict";

}
return [...map.values()];
return Array.from(map.values());
}

@@ -263,3 +263,10 @@

function uniqBy(arr, mapper) {
return uniqWith(arr, (item1, item2) => mapper(item1) === mapper(item2));
const map = /* @__PURE__ */ new Map();
for (const item of arr) {
const key = mapper(item);
if (!map.has(key)) {
map.set(key, item);
}
}
return Array.from(map.values());
}

@@ -266,0 +273,0 @@

2

dist/array/unionBy.js

@@ -34,3 +34,3 @@ "use strict";

}
return [...map.values()];
return Array.from(map.values());
}

@@ -37,0 +37,0 @@ // Annotate the CommonJS export names for ESM import in node:

@@ -26,19 +26,12 @@ "use strict";

module.exports = __toCommonJS(uniqBy_exports);
// src/array/uniqWith.ts
function uniqWith(arr, areItemsEqual) {
const result = [];
function uniqBy(arr, mapper) {
const map = /* @__PURE__ */ new Map();
for (const item of arr) {
const isUniq = result.every((v) => !areItemsEqual(v, item));
if (isUniq) {
result.push(item);
const key = mapper(item);
if (!map.has(key)) {
map.set(key, item);
}
}
return result;
return Array.from(map.values());
}
// src/array/uniqBy.ts
function uniqBy(arr, mapper) {
return uniqWith(arr, (item1, item2) => mapper(item1) === mapper(item2));
}
// Annotate the CommonJS export names for ESM import in node:

@@ -45,0 +38,0 @@ 0 && (module.exports = {

@@ -50,3 +50,3 @@ "use strict";

}
return [...map.values()];
return Array.from(map.values());
}

@@ -53,0 +53,0 @@

@@ -272,3 +272,3 @@ "use strict";

}
return [...map.values()];
return Array.from(map.values());
}

@@ -295,3 +295,10 @@

function uniqBy(arr, mapper) {
return uniqWith(arr, (item1, item2) => mapper(item1) === mapper(item2));
const map = /* @__PURE__ */ new Map();
for (const item of arr) {
const key = mapper(item);
if (!map.has(key)) {
map.set(key, item);
}
}
return Array.from(map.values());
}

@@ -298,0 +305,0 @@

{
"name": "es-toolkit",
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
"version": "1.3.1-dev.79+65a65ea2",
"version": "1.3.1-dev.80+60e79741",
"workspaces": [

@@ -6,0 +6,0 @@ "docs"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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