Skip to content

intersects

Given two arrays, returns true if any elements intersect.

Usage

intersects([1, 2, 3], [4, 5, 6]);
// false
intersects([1, 0, 0], [0, 1], (n) => n > 1);
// true

Installation

Terminal window
npx atmx add helper intersects