word-character-count

0.1.5 • Public • Published

Word and character count from html5 string.

Why this package?

Word and character count is a promise based function.

Installing

using npm

npm install word-character-count

using yarn

yarn add word-character-count

Usage

const wordCount = require("word-character-count");
 
const result = await wordCount.WordCount("<p>This endpoint works!</p>");

Return object

It returns JSON object as promise.

example:

result = {
    CharacterCount: 20,
    WordCount: 3,
    words: "This endpoint works!"
};

where WordCount and CharacterCount are both number dataType.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.544latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.544
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i word-character-count

Weekly Downloads

44

Version

0.1.5

License

MIT

Unpacked Size

3.57 kB

Total Files

4

Last publish

Collaborators

  • otisidev