facts-quiz

A collection of instresting facts

Usage no npm install needed!

<script type="module">
  import factsQuiz from 'https://cdn.skypack.dev/facts-quiz';
</script>

README

Facts Quiz

A collection of facts and it's truth availabe in JSON and as JS library

See all the facts

How to install ?

With Script tag

<script src="https://unpkg.com/facts-quiz@latest/dist/factsquiz.min.js"></script>

Install via NPM

npm i facts-quiz

Using the library

import fq from "facts-quiz";

// or import a particular function
import { getRandomFact } from "facts=quiz";

// get a random non repeating fact
fq.getRandomFact()

{
    "title": "Lightning never strikes in the same place twice.",
    "isTrue": false
}

// list all the facts
fq.getAllFacts()

// get total no. of facts
fq.getFactsLength()