{"_id":"@alpha_anas/06_word_counter","_rev":"2-21bd1e484b4cc05cc788165c6e2cc515","name":"@alpha_anas/06_word_counter","description":"This project is a simple word counter application written in TypeScript. The application reads a text file (`input.txt`) and counts the number of words in it. It includes professional-level features such as:","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@alpha_anas/06_word_counter","version":"1.0.0","author":"","license":"ISC","_id":"@alpha_anas/06_word_counter@1.0.0","maintainers":[{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"}],"bin":{"06_word_counter":"index.js"},"dist":{"shasum":"07e50878e24644231b1ccef7e3bcec6cd2adb536","tarball":"https://registry.npmjs.org/@alpha_anas/06_word_counter/-/06_word_counter-1.0.0.tgz","fileCount":6,"integrity":"sha512-w10u1FcmHE+Ame7NNLGUc3CSfoC/IKHH4I8M27Ggsim9lUKZgTzY7TkdNVmTg7kAS6qPdnF1k1oavTZ7rhddrw==","signatures":[{"sig":"MEQCIDughbIXsA9iIs+WgqbaNbdDx94CwMypaK9dJHl1MqXxAiBUm7kEW17HT9yy4reJtlDrTPAHAHS9NgnkVRUkzdHQFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17420},"main":"index.js","type":"module","gitHead":"79ee73384340ed66d156b8d7175d44b690b52295","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"},"_npmVersion":"10.2.4","description":"This project is a simple word counter application written in TypeScript. The application reads a text file (`input.txt`) and counts the number of words in it. It includes professional-level features such as:","directories":{},"_nodeVersion":"20.11.1","dependencies":{"inquirer":"^9.2.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/inquirer":"^9.0.7"},"_npmOperationalInternal":{"tmp":"tmp/06_word_counter_1.0.0_1718820023294_0.695422697057984","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@alpha_anas/06_word_counter","version":"1.0.1","author":"","license":"ISC","_id":"@alpha_anas/06_word_counter@1.0.1","maintainers":[{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"}],"bin":{"06_word_counter":"index.js"},"dist":{"shasum":"0b7bed5002d610a4f42706e64db171ba2b03c1c3","tarball":"https://registry.npmjs.org/@alpha_anas/06_word_counter/-/06_word_counter-1.0.1.tgz","fileCount":6,"integrity":"sha512-wpWOqjNxd7r5QVRjeuwFZHuoT9Y0FVFSNU6dijlEQ8vbX7cMbwBCJaLAIpJh3o2RXaTmlr7E8YMzxLl0PGuCBw==","signatures":[{"sig":"MEYCIQChLje9ftu0DGoABbc6TzS20XDT0RhQXN7HMfuvSyERgAIhALBUKpa9ouzzgGXQls67WovIky2iBMiegiziqBIYP+dM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19802},"main":"index.js","type":"module","gitHead":"79ee73384340ed66d156b8d7175d44b690b52295","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"},"_npmVersion":"10.2.4","description":"This project is a simple word counter application written in TypeScript. The application reads a text file (`input.txt`) and counts the number of words in it. It includes professional-level features such as:","directories":{},"_nodeVersion":"20.11.1","dependencies":{"inquirer":"^9.2.23"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/inquirer":"^9.0.7"},"_npmOperationalInternal":{"tmp":"tmp/06_word_counter_1.0.1_1718820337821_0.6855067352165025","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@alpha_anas/06_word_counter","version":"1.0.2","description":"This project is a simple word counter application written in TypeScript. The application reads a text file (`input.txt`) and counts the number of words in it. It includes professional-level features such as:","main":"index.js","type":"module","bin":{"06_word_counter":"index.js"},"publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","dependencies":{"inquirer":"^9.2.23"},"devDependencies":{"@types/inquirer":"^9.0.7"},"_id":"@alpha_anas/06_word_counter@1.0.2","gitHead":"64834e2bcb7e95fc7bc90725a8bfab310affa554","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-IEJlowWJfEquQ80fmHcnv/kbUJa5ptSbG6vXGbVsfsijrpkR8VEV0UVlMA8JXEKl1y/+fzJFrT0wLv74WGP9gg==","shasum":"fd9b4f96191dc3ac93eb776b328d7a1e32ea0356","tarball":"https://registry.npmjs.org/@alpha_anas/06_word_counter/-/06_word_counter-1.0.2.tgz","fileCount":6,"unpackedSize":19793,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjCcw6MdOCku6JWSezYaz/SU1JppLFpt2D3gd4yP4+CAiEAx9t03W7jzNdw1ekkl0VQcghUPpZadndzG1y47eCKqks="}]},"_npmUser":{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"},"directories":{},"maintainers":[{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/06_word_counter_1.0.2_1718820650873_0.11608966360816075"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-19T18:00:23.215Z","modified":"2024-06-19T18:10:51.263Z","1.0.0":"2024-06-19T18:00:23.456Z","1.0.1":"2024-06-19T18:05:37.976Z","1.0.2":"2024-06-19T18:10:51.062Z"},"maintainers":[{"name":"alpha_anas","email":"muhd.anas70pe@gmail.com"}],"license":"ISC","readme":"# Word Counter in Typescript\r\n\r\n## Overview\r\n\r\nThis project is a simple word counter application written in TypeScript. The application reads a text file (`input.txt`) and counts the number of words in it. It includes professional-level features such as:\r\n\r\n1. Ignoring multiple spaces.\r\n2. Supporting punctuation.\r\n3. Handling new lines.\r\n4. Generating a detailed report.\r\n\r\n## Features\r\n\r\n1. **Word Counting**: Counts the number of words in a given text file.\r\n2. **Detailed Report**: Provides a breakdown of word counts, unique words, and punctuation handling.\r\n3. **Error Handling**: Ensures the input is valid and handles edge cases.\r\n\r\n## Run the Application on CLI:\r\n\r\n\r\nnpm i @alpha_anas/06_word_counter\r\nnpx @alpha_anas/06_word_counter\r\n\r\n(and the game will start running on your Command Prompt / Terminal)\r\n\r\n### Compiling and Running on IDE\r\n\r\nwhen all the [dependencies](#Prerequisites) (as mentioned below) are successfully installed you can build and run the project using the\r\nbelow mentioned command :\r\n`tsc && node index.js`\r\n\r\n## Prerequisites\r\n\r\nBefore running the application, ensure you have the following installed:\r\n\r\n- [Node.js](https://nodejs.org/)\r\n- [npm](https://www.npmjs.com/)\r\n- [TypeScript](https://www.typescriptlang.org/)\r\n\r\n## Installation\r\n\r\n1. **Clone the repository**:\r\n\r\n   \r\n   git clone \"https://github.com/AlphaAnas/12-Typescript-Projects-of-PIAIC-course\"\r\n   cd \"06_Word_Counter\"\r\n  \r\n2. **Install the dependencies**:\r\n\r\n \r\n   npm install (to install node modules folder)\r\n   npm install inquirer\r\n   npm i --save-dev @types/inquirer\r\n   tsc --init   (to install tsconfig.json)\r\n   npm init -y (to install package.json) (keep pressing enter to make a general tsconfig.json file)\r\n\r\n\r\n### Important changes to make (note I have already made this following changes for you, so you do not have to make the same, however remember to make the same in your own version)\r\n\r\n   ```\r\n   In tsconfig.json file on line No.:14 change the *target* to *ESNext* i.e. `\"target\": \"ESNext\"` \r\n   also tsconfig.json file on line No.:28 change the *module* to *NodeNext* i.e. `\"module\": \"NodeNext\"`\r\n   also tsconfig.json file on line No.:28 change the *moduleResolution* to *NodeNext* i.e. `\"moduleResolution\": \"NodeNext\"`\r\n\r\n   Then in package.json file on line No.:10 after ( \"main\": \"index.js\",) enter the following two lines\r\n   ```\r\n    \"bin\": \"index.js\",\r\n    \"type\": \"module\",\r\n   ```\r\n### Example Interaction\r\n\r\n1. **User enters their input in a .txt file in the same folder**:\r\n\r\n   ```\r\n   Welcome to the Wordcounter APP\r\n   1. Enter the file name you entered the input in (.txt only)\r\n   2. (system checks if such file exists)\r\n   3. if yes: the system runs the process and gives ,word count, character count and sentence count.\r\n   3. if no: the system generates relevant error . \r\n   ```\r\n\r\n\r\n## Development\r\n\r\n### Run/ Edit the Application on IDE:\r\n\r\n        Clone or download the zip of the folder from : `https://github.com/AlphaAnas/12-Typescript-Projects-of-PIAIC-course/tree/main/06_Word_Counter`\r\n        `Then run the following commands to install the DEPENDENCIES (if already not installed, however i have already installed and pushed the following for you in the repository): `\r\n\r\n        ```\r\n                tsc --init\r\n                npm init -y\r\n                npm install inquirer\r\n                npm i --save-dev @types/inquirer\r\n\r\n        ```\r\n\r\n","readmeFilename":"README.md"}