UNPKG

custom-word-count

Version:

A cli tool which counts word in a given file or count a specific word count when provided in argument.

25 lines (18 loc) 790 B
# 📊 custom-word-count A simple Node.js CLI tool to count word frequencies in a file. You can count **all words** or a **specific word** case-insensitive and outputted as JSON. --- ## 🚀 Installation & Usage ### ✅ Option 1: Use with `npx` (no installation needed) ```bash npx custom-word-count <filePath> [wordToCount] npx custom-word-count ../file-2.txt # Count all words npx custom-word-count ../file-2.txt express # Count only the word "express" ``` ### ✅ Option 2: Install globally using npm ```bash npm install -g custom-word-count custom-word-count <filePath> [wordToCount] custom-word-count ../file-2.txt # Count all words custom-word-count ../file-2.txt express # Count only the word "express" ```