0.1.7 • Published 2 years ago

@homegrown/word-counter v0.1.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

This is a word count package which is support cjk and emoji

Getting started

npm install @homegrown/word-counter
const wordCounter = require("@homegrown/word-counter");

const text = "# 🙂 Hello, World.\n探索充满创新的世界。";

wordCounter.countWords(text); // count Words: 12
wordCounter.countLines(text); // count Lines: 2
wordCounter.countCharacters(text); // count characters without spaces: 24
wordCounter.countCharacters(text, true); // count characters with spaces: 27
wordCounter.count(text); // count all above items: {words: 12, lines: 2, characters: 24, charactersWithSpaces: 27}

Changelog

0.1.7

  • Fix include letter but except cjk letter, e.g. "Innodb的二级索引存储的值"

0.1.6

  • Update emoji regexp
  • Update word recognition
0.1.7

2 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago