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

x/ayonli_jsext/esm/array/index.js>split

A JavaScript extension package for building strong and modern applications.
Latest
function split
import { split } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/array/index.js";

Breaks the array into smaller chunks according to the given delimiter.

Examples

Example 1

import { split } from "@ayonli/jsext/array";

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];

console.log(split(arr, 5)); // [[1, 2, 3, 4], [6, 7, 8, 9]]

Parameters

arr
delimiter