src/js/utils.js
// returns multiple arrays out of a single arr
returns multiple arrays out of a single arr
returns multiple arrays out of a single arr
function chunk(array, size) {
  return array.reduce((chunks, item, i) => {
    if (i % size === 0) {
      chunks.push([item]);
    } else {  
      chunks[chunks.length - 1].push(item);
    }
    return chunks;
  }, []);
}
function chunk ( array , size ) { return array . reduce ( ( chunks , item , i ) => { if ( i % size === 0 ) { chunks . push ( [ item ] ) ; } else { chunks [ chunks . length - 1 ] . push ( item ) ; } return chunks ; } , [ ] ) ; }
returns multiple arrays out of a single arr
returns multiple arrays out of a single arr