count-chinese

1.0.3 • Public • Published

Count Chinese

npm

Count the number of Chinese (Mandarin) character in a string.

  • Work for both simplified and traditional Chinese.
  • Doesn't count everything else other than Chinese character (space, number, symbol, etc. are all ignored)

Install

npm install count-chinese

Usage

const countChinese = require('count-chinese');
countChinese('Hi!,我是台灣人。') // count = 5

Package Sidebar

Install

npm i count-chinese

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

2.28 kB

Total Files

4

Last publish

Collaborators

  • revirial