import { Arrays } from "https://deno.land/x/arrays@v1.0.21/mod.ts";
const { chunk } = Arrays;
Returns an array split into chunks. If the array can't be split equally based on the given size, the last chunk will be the remaining elements.
import 'https://deno.land/x/arrays/mod.ts'
const arr = [1, 2, 3, 4, 5]
const chunkedArr = arr.chunk(2)
// => [[1, 2], [3, 4], 5]