CLI.PrettyPrinter
This module lets you define how text should be formatted before printing it to the terminal.
A Document
represents formatted text.
Turn a String
into a Document. Newlines are not respected,
if you want to spread text over multiple lines, use verticalBlock.
Word boundaries are also not respected. If that's important to you, you might want to use words
Similar to text, but word boundaries are respected if the String
has
to be broken up over multiple lines. Whitespace between words are reduced to a single
space.
This joins multiple Documents into one. If possible, everything will be placed on a single line.
Supported text colors
Like color, but intensifies the given color.
This removes all colorized text in a Document.
Convert a Document into a String
that's ready to be written
to the terminal.
Different settings when converting a Document into String
.
maxColumns
defines the maximum number of characters in a line.indentationSize
defines the number of spaces per indentation level.newlineSeparator
defines theString
used for representing newlines.
A default set of options for converting Document into String
.
Like toString, but allows you to override the default options.