facts-quiz
v1.0.5
Published
A collection of instresting facts
Downloads
8
Maintainers
Readme
Facts Quiz
A collection of facts and it's truth availabe in JSON and as JS library
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()