Skip to content

njkih/word-reverser-tea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Word Counter Tea

Welcome to the Word Counter Tea. This library provides a simple and efficient way to count the number of words in a given text. It can be used in various applications where text analysis is required.

Features

  • Count the number of words in a text
  • Ignore punctuation and special characters
  • Handle multiple languages
  • Fast and lightweight

Installation


npm install word-counter-tea

Usage

First, import the countWords function from the library:


const { countWords } = require('word-counter-tea');

Counting Words

Use the countWords function to count the number of words in a text:


const text = "Hello, world! This is a simple word counter example.";
const wordCount = countWords(text);
console.log('Word count:', wordCount);

API

countWords(text)

Counts the number of words in a given text.

  • text (string): The text to count words in.
  • Returns: The number of words in the text.

Example


const { countWords } = require('word-counter-tea');

const text = "OpenAI's ChatGPT is an advanced language model.";
const wordCount = countWords(text);
console.log('Word count:', wordCount);  // Output: Word count: 7

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages