export default function ChunkFilterFactory() {
  return function chunkFilter(arr, _size) {
    const size = parseInt(_size, 10);
    const newArr = [];
    for (let i = 0; i < arr.length; i += size) {
      newArr.push(arr.slice(i, i + size));
    }
    return newArr;
  };
}
