count the words in a string or rich text editor or html. Support for english, Chinese.
npm install @ycjcl868/wordcount> Count the words in a string or rich text editor or html. Support for english, Chinese.
Install with npm:
``sh`
$ npm install @ycjcl868/wordcount --save
`js
var wordCount = require('@ycjcl868/wordcount');
wordCount('count words.');
//=> 2
wordCount('count words, again.');
//=> 3
wordCount('
should 你好 html
hello
')ChangeLogs
- v1.0.2 2018.7.31
About
$3
* is-whitespace: Returns true if the value passed is all whitespace. | homepage
* whitespace-regex: Regular expression for matching the whitespace in a string. | homepage
* word-regex: Regular expression for matching words in a string. Support for english, CJK and Cyrillic. | homepage
* wordcount: Count the words in a string. Support for english, CJK and Cyrillic. | homepage
$3
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
$3
_(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)_
To generate the readme and API documentation with verb:
`sh
$ npm install -g verb verb-generate-readme && verb
`$3
Install dev dependencies:
`sh
$ npm install -d && npm test
``Kylin King
* github/ycjcl868
* twitter/ycjcl
Copyright © 2018, Kylin King.
Released under the MIT license.