Bun

interface

WrapAnsiOptions

interface WrapAnsiOptions

  • ambiguousIsNarrow?: boolean

    When it's ambiguous and true, count ambiguous width characters as 1 character wide. If false, count them as 2 characters wide.

  • hard?: boolean

    If true, break words in the middle if they don't fit on a line. If false, only break at word boundaries.

  • trim?: boolean

    If true, trim leading and trailing whitespace from each line. If false, preserve whitespace.

  • wordWrap?: boolean

    If true, wrap at word boundaries when possible. If false, don't perform word wrapping (only wrap at explicit newlines).