UNPKG

bbo

Version:

bbo is a utility library of zero dependencies for javascript.

10 lines (8 loc) 177 B
/** * Returns a list of elements that exist in both arrays. */ function intersect(a, b) { var s = new Set(b); return a.filter(x => s.has(x)); } export default intersect;