Documentation
    Preparing search index...

    Function wrapToWidth

    • Packs items into lines that do not exceed wrapWidth except for a single unbreakable run longer than the measure (emergency overflow).

      spacing is inserted between adjacent items on a line, matching letterSpacing. Empty items yields no lines — the caller maps an empty paragraph onto a blank \n line itself.

      Type Parameters

      Parameters

      • items: readonly T[]
      • wrapWidth: number
      • spacing: number

      Returns T[][]