You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Get the visual width of the widest line in a string - the number of columns required to display it
Useful to be able to know the maximum width a string will take up in the terminal.
$ npm install widest-line
const widestLine = require('widest-line'); widestLine('古\n\u001B[1m@\u001B[22m'); //=> 2
- string-width - Get the visual width of a string
MIT © Sindre Sorhus