import { chunk } from "https://deno.land/x/simplestatistics@v7.7.5/index.js";
Split an array into chunks of a specified size. This function has the same behavior as PHP's array_chunk function, and thus will insert smaller-sized chunks at the end if the input size is not divisible by the chunk size.
x
is expected to be an array, and chunkSize
a number.
The x
array can contain any kind of data.