Skip to content

intersection

Creates an array of unique values ​​contained in all given arrays.

Usage

ts
import { intersection } from 'rattail'

intersection([1, 2, 3, 3], [2, 3, 4])
// return [2, 3]
intersection([1, 2, 3, 3], [2, 3, 4], [3, 4, 5])
// return [3]

Arguments

ArgTypeDefaults
...valuesArray<Array>

Return

Type
Array