A simple Node.js CLI application built using only core modules, plain callbacks, and asynchronous I/O functions
- Allows the user to supply a CLI argument containing a comma-separated list of
tags
- If no argument is given, the
data/tags.txt
file is parsed to get an array of tags
- If no argument is given, the
- Each of the provided tags are cross referenced with the objects in
data/flat-files/*.json
to determine the amount of times they appear - If any JSON parsing errors occur during the processing of the
data/flat-files/*.json
files, they are logged withconsole.error()
and the processing continues - The results of the JSON parsing are stored in a
data/cache.json
file to speed up subsequent executions - The final output prints the tag name and associated count in descending order:
ipsum 3
dolor 2
amet 2
lorem 0
sit 0
Thanks goes to these wonderful people (emoji key):
Andrew Torres 💻 📖 🤔 🚇 |
This project follows the all-contributors specification. Contributions of any kind are welcome!