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.1.0-dev.45 to 1.1.0-dev.46

dist/chunk-4PNP6CKQ.mjs

2

dist/array/differenceBy.d.ts

@@ -20,3 +20,3 @@ /**

* @example
* * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];
* const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];
* const array2 = [{ id: 2 }, { id: 4 }];

@@ -23,0 +23,0 @@ * const mapper = item => item.id;

@@ -27,5 +27,5 @@ "use strict";

function differenceBy(firstArr, secondArr, mapper) {
const mappedSecondArr = secondArr.map((item) => mapper(item));
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
return firstArr.filter((item) => {
return !mappedSecondArr.includes(mapper(item));
return !mappedSecondSet.has(mapper(item));
});

@@ -32,0 +32,0 @@ }

@@ -79,5 +79,5 @@ "use strict";

function differenceBy(firstArr, secondArr, mapper) {
const mappedSecondArr = secondArr.map((item) => mapper(item));
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
return firstArr.filter((item) => {
return !mappedSecondArr.includes(mapper(item));
return !mappedSecondSet.has(mapper(item));
});

@@ -84,0 +84,0 @@ }

@@ -29,5 +29,5 @@ "use strict";

function differenceBy(firstArr, secondArr, mapper) {
const mappedSecondArr = secondArr.map((item) => mapper(item));
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
return firstArr.filter((item) => {
return !mappedSecondArr.includes(mapper(item));
return !mappedSecondSet.has(mapper(item));
});

@@ -34,0 +34,0 @@ }

@@ -108,5 +108,5 @@ "use strict";

function differenceBy(firstArr, secondArr, mapper) {
const mappedSecondArr = secondArr.map((item) => mapper(item));
const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
return firstArr.filter((item) => {
return !mappedSecondArr.includes(mapper(item));
return !mappedSecondSet.has(mapper(item));
});

@@ -113,0 +113,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.1.0-dev.45+4ec747ea",
"version": "1.1.0-dev.46+fa22ab16",
"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