cli-truncate
Truncate a string to a specific width in the terminal
fast-string-truncated-width
A fast function for calculating where a string should be truncated, given an optional width limit and an ellipsis string.
tty-truncate
Truncate a string to the current text terminal width