Basic usage

Given two arrays of items, returns true if any item exists in both arrays.

import { intersects } from 'radash'

const oceanFish = ['tuna', 'tarpon']
const lakeFish = ['bass', 'trout']

intersects(oceanFish, lakeFish) // => false

const brackishFish = ['tarpon', 'snook']

intersects(oceanFish, brackishFish) // => true

Testing

This _.intersects function is 100% covered by tests. See them and contribute at GitHub.

Source

See the source for _.intersects on GitHub.