# quizer

> A smooth and easy way to create a quiz, without hard-coding your questions.

Latest version **1.0.2** (published 2019-05-26) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install quizer
pnpm add quizer
yarn add quizer
bun add quizer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-05-26 |
| First published | 2019-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mwex |
| Maintainers | mwexim |
| Keywords | quiz |

## Links

- npm: https://www.npmjs.com/package/quizer
- npm.io page: https://npm.io/package/quizer

## Dependencies (1)

- [json-config-store](https://npm.io/package/json-config-store.md) 0.0.1

## Recent versions

- 1.0.2 (latest) — 2019-05-26
- 1.0.1 — 2019-05-26
- 1.0.0 — 2019-05-26

## README

# Quizer

### Introduction
Welcome to Quizer, an easy and smooth way to make your own quiz.

The reason I started this project was because I had to code a quiz for a project. This project was a website where you could find some quizzes. I had to **hard code** every quiz, so that's why I made this simple, but effective NPM package for Javascript users.

You basically make a  new quiz, and then you have some methods to change the quiz to your belongings. In the futur, I will make some more methods for sure!

Here you have an example:
```javascript
// Get the package
const Quiz = require('quizer');

// Create a new quiz
const myQuiz = new Quiz("My Quiz Name");

// Add a question to the quiz
myQuiz.add("How much is 2 + 3?", "5");

// Checks if the question is already in the quiz using an ID
if (!myQuiz.has("How much is 5 -1?")) {
	myQuiz.set(2 /* Question 2 */, "How much is 5 - 1?", "4");
}

// Adds the question only if it doesn't exist
myQuiz.addIfNotSet("How much is 2 + 3?", "5");

// Returns the answer and the question of a specific question ID
  // Logs {question: "How much is 2 + 3?", answer: "5"} 
  // (from above example)
  console.log(myQuiz.get(2))

  // Logs "How much is 2 + 3?" and "5" seperatly
  console.log(myQuiz.get(2).question)
  console.log(myQuiz.get(2).answer)

// Logs a random question
console.log(myQuiz.getRandom())
```


### Coming

I have some features planned to complete the API:

 - [ ] More than 1 answer in a question
 - [ ] Delete questions
 - [ ] Delete a whole quiz

---
_Source: https://npm.io/package/quizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
