intersection
intersection
returns a new array that is the intersection of arrays.
import { intersection } from '@rvoh/dream'
intersection([1, 2, 3], [2, 3, 4], [-1, 3, 7, 2]) // [2, 3]
intersection(['a', 'b', 'c'], ['b', 'd']) // ['b']
intersection
returns a new array that is the intersection of arrays.
import { intersection } from '@rvoh/dream'
intersection([1, 2, 3], [2, 3, 4], [-1, 3, 7, 2]) // [2, 3]
intersection(['a', 'b', 'c'], ['b', 'd']) // ['b']