Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WordWrapOpts

Hierarchy

  • WordWrapOpts

Index

Properties

delimLine

delimLine: string | RegExp

Line delimiter string or regexp (newline chars by default).

delimWord

delimWord: string | RegExp

Word delimiter string or regexp (whitespace by default).

hard

hard: boolean

If true, words longer than WordWrapOpts.width will be split over multiple lines. If false (default), lines might become longer than the configured wrap width.

defaultvalue

false

min

min: number

When adding a word to a line, and the line only has less than this option's value chars available and iff the word is longer than that, it will be placed into a new line (thus minimizing legibility issues).

defaultvalue

4

splitter

splitter: IWordSplit

Word splitting strategy. Use SPLIT_ANSI when wordwrapping text w/ ANSI colors/seqs. The default SPLIT_PLAIN only supports plain text and will yield wrong results.

defaultvalue

SPLIT_PLAIN

width

width: number

Target line width for word wrapping.

default

80

Generated using TypeDoc