Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/polkadot/util/array/chunk.ts>arrayChunk

Package publishing for deno.land/x/polkadot
Go to Latest
function arrayChunk
import { arrayChunk } from "https://deno.land/x/polkadot@0.2.11/util/array/chunk.ts";

Examples

import { arrayChunk } from 'https://deno.land/x/polkadot@0.2.11/util/mod.ts';

arrayChunk([1, 2, 3, 4, 5]); // [[1, 2], [3, 4], [5]]

Parameters

array: T[]
chunkSize: number