Module

x/lodash_es/src/array.js>chunk

lodash for deno use
Latest
function chunk
import { chunk } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/array.js";

Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.

Examples

_.chunk(['a', 'b', 'c', 'd'], 2); // => [['a', 'b'], ['c', 'd']]

_.chunk(['a', 'b', 'c', 'd'], 3); // => [['a', 'b', 'c'], ['d']]

Parameters

array

The array to process.

size
guard