word-width
word-width is simple browserjs / nodejs library for calculate ascii length of unicode string in terminal / console.
Inspired by jquast/wcwidth which is written by Python.
1. Install
npm install --save word-width
2. Import It
Script
tag.
ES6
style.
var WordWidth = ; //or ;
3. Usage & API
There is only one API named WordWidth(word)
.
// english; //17 // unicode; //19; //18
4. Test
npm install
npm test
5. LICENSE
MIT