tiny-wcwidth

1.0.0 • Public • Published

tiny-wcwidth

Determine columns needed for a wide character.

npm i tiny-wcwidth

Usage

const wcwidth = require('tiny-wcwidth')

'한'.length // 1
wcwidth('한') // 2

'한글'.length // 2
wcwidth('한글') // 4

'🤦🏼‍♂️'.length // 7
wcwidth('🤦🏼‍♂️') // 2

Simplified fork of wcwidth.js with added support for multi-codepoint emojis.

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i tiny-wcwidth

      Weekly Downloads

      0

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      11.6 kB

      Total Files

      6

      Last publish

      Collaborators

      • lukks