A lib for counting your words and reading time
// npm
$ npm install @jooger/word-counter
// yarn
$ yarn add @jooger/word-counter
import { wordCount, timeCalc } from '@jooger/word-counter'
const content = 'this 中文 is a 单词'
const count = wordCount(content, count => {
return count * 2
}) // the origin count is 7, the transformed data is 14
const time = timeCalc(content, {
cn: 300, // the number of cn words per minute read
en: 160 // the number of en words per minute read
}) // time is 1
MIT