Radash
  1. Array
  2. intersects

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