You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
unboundedpress/node_modules/power-assert-util-string-width
Michael Winter 555e2c196e initial commit 5 years ago
..
README.md initial commit 5 years ago
index.js initial commit 5 years ago
package.json initial commit 5 years ago

README.md

power-assert

Build Status NPM version License

Calculates width of given string. Treat ambiguous-width characters as fullwidth (= 2) by default.

USAGE

var stringWidth = require('power-assert-util-string-width');
stringWidth('abcde'); //=> 5
stringWidth('あいうえお'); //=> 10
stringWidth('アイウエオ'); //=> 5
stringWidth('※脚注');  //=> 6
// stringWidth.narrow treats ambiguous-width characters as narrow (= `1`)
stringWidth.narrow('※脚注');  //=> 5

INSTALL

$ npm install --save-dev power-assert-util-string-width

AUTHOR

LICENSE

Licensed under the MIT license.