src/tools/negociateLocale.js
function simpleIntersection(array1, array2) {
  return array1
    // Remove falsy elements
    .filter(el => el)
    // Match elements belonging in the two arrays
    .filter(el => array2.indexOf(el) !== -1)
    // Remove duplicates
    .filter((el, idx, arr) => arr.indexOf(el) === idx);
}
function simpleIntersection(array1, array2) {
  return array1
    // Remove falsy elements
    .filter(el => el)
    // Match elements belonging in the two arrays
    .filter(el => array2.indexOf(el) !== -1)
    // Remove duplicates
    .filter((el, idx, arr) => arr.indexOf(el) === idx);
}
function simpleIntersection ( array1 , array2 ) { return array1 // Remove falsy elements . filter ( el => el ) // Match elements belonging in the two arrays . filter ( el => array2 . indexOf ( el ) !== - 1 ) // Remove duplicates . filter ( ( el , idx , arr ) => arr . indexOf ( el ) === idx ) ; }
Simple truthy-only, unique intersection function of two arrays.

@param Array   array1
@param Array   array2

@return Array
Simple truthy - only unique intersection function of two arrays .