A small JavaScript library for aligning text in the terminal.
You can install the package using npm
npm install terminal-text-align
import * from "terminal-text-align"
left("Left aligned text");
right("Right aligned text");
center("Center aligned text");
left(text: string)
Aligns the given text to the left.
right(text: string)
Aligns the given text to the right.
center(text: string)
Aligns the given text to the center.
Keep in mind that this package may not work on all terminals and operating systems and it may not be the most compatible or portable way to align text in the terminal. Also, this package does not handle console resizing, so the text will not reposition if the console size changes.