terminal-text-width
v0.1.0
Published
Get the number of columns occupied by specified text in terminal.
Downloads
2
Readme
terminal-text-width
Get the number of columns occupied by specified text in terminal.
Install
$ npm install terminal-text-width --save
Usage
var getTextWidth = require('terminal-text-width');
getTextWidth("hi") //-> 2
getTextWidth("你好") //-> 4
getTextWidth("안녕하세요") //->10
License
MIT