You can see below the API reference of this module.
Creates a new ASCII box.
-
Object|String
options
: A string representing the size:WIDTHxHEIGHT
(e.g.10x20
) or an object: -
width
orw
(Number): The box width. -
height
orh
(Number): The box height. -
fullscreen
(Boolean): Iftrue
, the box will have full size (default:false
). -
stringify
(Boolean): Iffalse
the box will not be stringified (theCliBox
object will be returned instead). -
marks
(Object): An object containing mark characters. Default:nw
:"┌"
n
:"─"
ne
:"┐"
e
:"│"
se
:"┘"
s
:"─"
sw
:"└"
w
:"|"
b
:" "
-
Object|String
text
: A string to be displayed or an object: -
text
(String): The text to be displayed. -
stretch
(Boolean): Stretch box to fix text (default:false
). -
autoEOL
(Boolean): Break lines automatically (default:false
). -
hAlign
(String): Horizontal alignement (default:"middle"
). It can take one of the values:"left"
,"middle"
,"right"
. -
vAlign
(String): Vertical alignement (default:"center"
). It can take one of the values:"top"
,"center"
,"bottom"
.
- Object|Stringify The
CliBox
object (ifoptions.stringify
isfalse
) or the stringified box.
Returns the stringified box.
- String Stringified box string.