string-width
Get the visual width of a string - the number of columns required to display it
$
npm install string-widthOfficial docs outline
Extra Credit builds an outline of string-width's docs the first time your work uses it. Until then, start at the official documentation.
More in npm packages
All 9,484-
ansi-styles ANSI escape codes for styling strings in the terminal
-
debug Lightweight debugging utility for Node.js and the browser
-
brace-expansion Brace expansion as known from sh/bash
-
lru-cache A cache object that deletes the least-recently-used items.
-
commander the complete solution for node.js command-line programs
-
ms Tiny millisecond conversion utility
-
strip-ansi Strip ANSI escape codes from a string
-
ansi-regex Regular expression for matching ANSI escape codes
-
picomatch Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob feat
-
supports-color Detect whether a terminal supports color
-
chalk Terminal string styling done right
-
wrap-ansi Wordwrap a string with ANSI escape codes