src/js/base/core/lists.js
function compact(array) {
  const aResult = [];
  for (let idx = 0, len = array.length; idx < len; idx++) {
    if (array[idx]) { aResult.push(array[idx]); }
  }
  return aResult;
}
function compact(array) {
  const aResult = [];
  for (let idx = 0, len = array.length; idx < len; idx++) {
    if (array[idx]) { aResult.push(array[idx]); }
  }
  return aResult;
}
function compact ( array ) { const aResult = [ ] ; for ( let idx = 0 , len = array . length ; idx < len ; idx ++ ) { if ( array [ idx ] ) { aResult . push ( array [ idx ] ) ; } } return aResult ; }
returns a copy of the array with all false values removed

@param {Array} array - array
@param {Function} fn - predicate function for cluster rule
returns a copy of the array with all false values removed