src/tree-multiselect/utility/array.js
function filterInPlace (arr, pred) {
  var idx = 0;
  for (var ii = 0; ii < arr.length; ++ii) {
    if (pred(arr[ii])) {
      arr[idx] = arr[ii];
      ++idx;
    }
  }
  arr.length = idx;
}
function filterInPlace (arr, pred) {
  var idx = 0;
  for (var ii = 0; ii < arr.length; ++ii) {
    if (pred(arr[ii])) {
      arr[idx] = arr[ii];
      ++idx;
    }
  }
  arr.length = idx;
}
function filterInPlace ( arr , pred ) { var idx = 0 ; for ( var ii = 0 ; ii < arr . length ; ++ ii ) { if ( pred ( arr [ ii ] ) ) { arr [ idx ] = arr [ ii ] ; ++ idx ; } } arr . length = idx ; }
keeps if pred is true
keeps if pred is true