Breaks a string into chunks of size chunkSize.
chunkSize
The last chunk may contain less than chunkSize characters.
the string to chunk
a positive integer
an array of strings
RangeError if chunkSize is not a positive integer
import { chunkEvery } from "@trashpanda001/helpers/string"chunkEvery("Hello", 2)// ["He, "ll", "o"] Copy
import { chunkEvery } from "@trashpanda001/helpers/string"chunkEvery("Hello", 2)// ["He, "ll", "o"]
Breaks a string into chunks of size
chunkSize
.The last chunk may contain less than
chunkSize
characters.