columns — independent software & tools
-
string-width
Get the visual width of a string - the number of columns required to display it
-
terminal-size
Reliably get the terminal window size (columns & rows)
-
widest-line
Get the visual width of the widest line in a string - the number of columns required to display it
-
window-size
Reliable way to get the height and width of terminal/console, since it's not calculated or updated the same way on all platforms, environments and node.js versions.