
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@extra-array/intersection
Advanced tools
Gives values present in both arrays. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
Similar: union, intersection, difference, symmetricDifference.
Similar: isUnique, isDisjoint, intersection.
This is part of package extra-array.
array.intersection(x, y, [fc], [fm]);
// x: an array
// y: another array
// fc: compare function (a, b)
// fm: map function (v, i, x)
:stopwatch: Compare function => O(n²).
const array = require("extra-array");
var x = [1, 2, 3, 4];
var y = [2, 3, 5];
array.intersection(x, y);
// [ 2, 3 ]
var y = [-2, -3, -5];
array.intersection(x, y, (a, b) => Math.abs(a) - Math.abs(b));
// [ 2, 3 ]
array.intersection(x, y, null, v => Math.abs(v));
// [ 2, 3 ]
FAQs
Gives values present in both arrays.
The npm package @extra-array/intersection receives a total of 6 weekly downloads. As such, @extra-array/intersection popularity was classified as not popular.
We found that @extra-array/intersection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.