anime-quiz
Version:
A simple module to generate anime quiz.
73 lines (54 loc) • 1.33 kB
Markdown
<div align=center>
[](https://npmjs.com/package/anime-quiz)
**AnimeQuiz** is a simple module to generate Anime Quiz with options for answer.
It has over 100 quizzes
</div>
---
```sh
npm i anime-quiz
yarn add anime-quiz
```
```ts
import { Quiz } from 'anime-quiz' //const { Quiz } = require('anime-quiz')
(() => {
const { getRandom } = new Quiz()
console.log(getRandom())
})()
```
```
{
id: 84,
question:
"What is the name of the stuffed lion in Bleach?",
options: [
"Jo",
"Kon",
"Chad",
"Urdiu",
],
answer: "Kon",
}
```
```ts
import { Quiz } from 'anime-quiz' //const { Quiz } = require('anime-quiz')
(() => {
const { getQuizById } = new Quiz()
console.log(getQuizById(34))
})()
```
```
{
id: 34,
question:
"In the 2011 TV anime series, \"The iDOLM@ster\", what was the name of Iori's stuffed toy bunny?",
options: ["Usagi", "Bubsy", "Charles", "Kero"],
answer: "Charles",
}
```