StringWidthOptions

Bun

Symbol

StringWidthOptions

interface StringWidthOptions

  • ambiguousIsNarrow?: boolean

    When it's ambiugous and true, count emoji as 1 characters wide. If false, emoji are counted as 2 character wide.

  • countAnsiEscapeCodes?: boolean

    If true, count ANSI escape codes as part of the string width. If false, ANSI escape codes are ignored when calculating the string width.