@trashpanda001/helpers
    Preparing search index...

    Function chunkEvery

    • Breaks a string into chunks of size chunkSize.

      The last chunk may contain less than chunkSize characters.

      Parameters

      • string: string

        the string to chunk

      • chunkSize: number

        a positive integer

      Returns string[]

      an array of strings

      RangeError if chunkSize is not a positive integer

      import { chunkEvery } from "@trashpanda001/helpers/string"

      chunkEvery("Hello", 2)
      // ["He, "ll", "o"]