prettifies the output of a Lox' item - similar to what the console
methods do, but with some improvements:
Item.of(outputLox).prettify(true, {
depth: outputLox.module.slicedName.length + outputLox.box.length,
color: outputLox.module.color,
})
should the output be colored (with ANSI colors)
options for the box surrounding the printed item
the vertical depth, where the box starts / ends (typically the column of the log's box)
undefined
, the box will be greycolor of the box and surrounding text (typically the color of the log's box)
undefined
the box will have a depth of 20 and is not connected to the surrounding box layouta pretty string of the item
The static constructor of the Item helper class. Use it for any OutputLox
or ErrorLox
:
Item.of(outputLox)
to pretty print the item for
a chained function prettify(...)
to pretty print the item of the lox
Generated using TypeDoc
A helper class that can be used to pretty print items of
Lox
es