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

x/ayonli_jsext/esm/string/index.js>chunk

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

Breaks the string into smaller chunks according to the given length.

Examples

Example 1

import { chunk } from "@ayonli/jsext/string";

console.log(chunk("hello world", 3)); // ["hel", "lo ", "wor", "ld"]

Parameters

str
length