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

lodash.intersection

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.intersection

The Lo-Dash function `_.intersection` as a Node.js module generated by lodash-cli.

  • 2.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
450K
increased by35.88%
Maintainers
4
Weekly downloads
 
Created

What is lodash.intersection?

The lodash.intersection package is a utility library that provides a function to compute the intersection of multiple arrays. This means it returns an array of values that are present in all of the provided arrays.

What are lodash.intersection's main functionalities?

Array Intersection

This feature allows you to find the common elements in multiple arrays. In the provided code sample, the intersection of array1, array2, and array3 is computed, resulting in [3], which is the only element present in all three arrays.

const intersection = require('lodash.intersection');
const array1 = [1, 2, 3];
const array2 = [2, 3, 4];
const array3 = [3, 4, 5];
const result = intersection(array1, array2, array3);
console.log(result); // Output: [3]

Other packages similar to lodash.intersection

Keywords

FAQs

Package last updated on 26 Nov 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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