This repository has been archived on 2021-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
simpledash/bulma/node_modules/string-width
Arsen Musayelyan bb2c9351d6 Remove unnecessary resources, add bulma, and add AdvMakefile 2021-03-29 15:02:41 -07:00
..
index.js Remove unnecessary resources, add bulma, and add AdvMakefile 2021-03-29 15:02:41 -07:00
license Remove unnecessary resources, add bulma, and add AdvMakefile 2021-03-29 15:02:41 -07:00
package.json Remove unnecessary resources, add bulma, and add AdvMakefile 2021-03-29 15:02:41 -07:00
readme.md Remove unnecessary resources, add bulma, and add AdvMakefile 2021-03-29 15:02:41 -07:00

readme.md

string-width Build Status

Get the visual width of a string - the number of columns required to display it

Some Unicode characters are fullwidth and use double the normal width. ANSI escape codes are stripped and doesn't affect the width.

Useful to be able to measure the actual width of command-line output.

Install

$ npm install --save string-width

Usage

const stringWidth = require('string-width');

stringWidth('古');
//=> 2

stringWidth('\u001b[1m古\u001b[22m');
//=> 2

stringWidth('a');
//=> 1

License

MIT © Sindre Sorhus