esmile-fun

A simple NPM package which can return everyday quotes, jokes, riddles and interesting facts.

Usage no npm install needed!

<script type="module">
  import esmileFun from 'https://cdn.skypack.dev/esmile-fun';
</script>

README

Esmile Fun

A simple NPM package which can return everyday quotes, jokes, riddles and interesting facts.

Installation

npm i esmile-fun

Usage

const all = require("esmile-fun");

console.log(all.getRandomQuote());

console.log(all.getRandomJoke());

console.log(all.getRandomRiddle());
  • getRandomQuote() returns an object containing quote and author -
{
      "quote":"Don't cry because it's over, smile because it happened.",
      "author":"Dr. Seuss"
}
  • getRandomJoke() returns an object containing body and category -
{
      "body":"Paddy and Mick were standing at a road junction,they spotted a truck carrying aload of rolled up lawn turfPaddy says to Mick \"aye thats what i,m going to do when I win the lottery\"Mick says \"whats that then Paddy?\"Paddy replies \"send my grass away forcutting\".",
      "category":"Men"
}
  • getRandomRiddle() returns an object containing riddle and answer -
{
    "riddle": "Thirty white horses on a red hill, First they champ, Then they stamp, Then they stand still. ",
    "answer": "Teeth"
}