New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hazard-qna

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hazard-qna

Question-Answer based CLI game for JavaScript

latest
npmnpm
Version
1.2.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

ProLang Slayer 🧠🔥

ProLang Slayer is a powerful command-line quiz application designed to challenge and improve your knowledge of popular programming languages including JavaScript, Python, and C.

Engage in a vibrant terminal interface, test your coding wits, and survive a thrilling code-slaying experience — but beware: one wrong answer and it’s Game Over!

🚀 Features

  • Language Selection: Choose between JavaScript, Python, or C.
  • Randomized Questions: Shuffled using the Fisher-Yates algorithm for a unique experience every time.
  • Interactive CLI: Built with inquirer, styled using chalk, chalk-animation, and gradient-string.
  • Scoring System: Earn a point for each correct answer.
  • Sudden Death: A single incorrect answer ends the game.
  • Victory Screen: Celebrate with styled ASCII art and final score display.
  • Multiple Choice Format: Consistent and beginner-friendly.
  • Cross-Language Support: 10 curated questions per language, covering basic to advanced concepts.

🛠 Prerequisites

  • Node.js: Version 14 or higher
  • npm: To install and manage dependencies

⚡ Installation

Use npx to run without installing:

npx hazard-qna

Local Installation (For Developers)

git clone <repository-url>
cd prolang-slayer
npm install chalk inquirer gradient-string chalk-animation figlet nanospinner console-clear

Optional global installation:

npm install -g hazard-qna

📁 Project Structure

prolang-slayer/
├── index.js          # Main application logic
├── javascript.js     # JavaScript question set
├── python.js         # Python question set
├── C.js              # C language question set

🎮 Usage

You can run the app in three different ways:

1. Instantly via npx (most convenient):

npx hazard-qna

2. Locally:

node index.js

3. Globally (if installed with -g):

hazard-qna

🧑‍💻 How to Play

  • Launch the app.
  • Select a programming language: C, JavaScript, or Python.
  • Enter your name (optional).
  • Answer each question correctly to proceed.
  • One wrong answer = Game Over.

📸 Example Output

Welcome to ProLang Slayer
🔥 Code Quiz Challenge 🔥
Welcome! I'm a vibrant process ready to test your JavaScript or Python prowess. 💻
Choose your language and answer the question with precision — one error, and it's GAME OVER! 😎
Unleash your inner code ninja, let your dev spirit shine!
Ready for the epic start? Let’s dive in! 🚀

? Choose the language you want to slay >>> JavaScript
? What is your name? Alice
? JavaScript was created in 10 days then released on
✔ Checking answer... Wo-ooh!! Nice work Alice. That's a legit answer

📦 Dependencies

  • chalk – For colorful terminal text.
  • inquirer – Interactive prompts.
  • gradient-string – Gradient terminal text.
  • chalk-animation – Animated terminal messages.
  • figlet – ASCII text generation.
  • nanospinner – Loading animations.
  • console-clear – Clears the terminal screen.

📝 Notes

  • Built on Node.js’s non-blocking event loop.
  • Covers both beginner and intermediate-level programming knowledge.
  • Exits with:
    • Code 0 on success.
    • Code 1 on game over.
  • No score history is saved — fresh start every time.

🤝 Contributing

We welcome all contributions!

  • Fork the repository.
  • Create a feature branch.
  • Add your changes (e.g., new questions, improvements).
  • Submit a Pull Request with a clear description.

👨‍🎨 Credits

Crafted by 4lex.Riley.90s
Inspired by the passion for coding and interactive CLI experiences.

📄 License

This project is licensed under the MIT License.

FAQs

Package last updated on 25 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts