Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

word-count

lepture88kMIT0.3.1TypeScript support: included

Word count in respect of CJK characters.

count, word-count

readme

word-count

Word count in respect of CJK characters.

Installation

Install with npm:

$ npm install word-count

API

import count from 'word-count'

const text = 'hello means 你好'
count(text)
// 4

License

MIT