count-word-cli
v1.0.4
Published
A simple CLI tool to count words and characters in a text string.
Maintainers
Readme
count-word-cli
A simple command-line tool to count words and characters in a text string.
Useful for writers, bloggers, developers, and anyone working with text analysis!
🚀 Installation
Install globally so you can run the wordcount command anywhere:
npm install -g count-word-cli💻 Usage
Run from the CLI
wordcount "Your text goes here"Example:
wordcount "ami bangladesh e thaki"Output:
Word count: 4
Character count (with spaces): 23
Character count (without spaces): 19📦 Programmatic Usage
You can also use the package in your JavaScript projects.
ESM (import):
import { countWords } from "count-word-cli";
const result = countWords("ami bangladesh e thaki");
console.log(result.wordCount); // 4CommonJS (require):
const { countWords } = require("count-word-cli");
const result = countWords("ami bangladesh e thaki");
console.log(result.wordCount); // 4🙋♂️ Author
- Name: Md. Rezwan Saki Alin
- Website: alinsworld
Thanks for using count-word-cli! 🚀
