0.0.2 • Published 4 years ago

factfull.js v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

FACTFULL.JS

This is a NPM Package used for Facts, Images, Search, Jokes, Astrology, Etc but this Package is Early Access but still you can use some functions.

START WITH BASICS

Import the NPM Packge to your Project.

const factful = require("factful.js")

FUNCTIONS WHICH CAN BE USED NOW

  • RANDOM IMAGES OF SPACE
  • RANDOM FACTS ABOUT SPACE, DOGS, CATS, COVID-19 OR ALL OF THEM

1. GETTING RANDOM IMAGES OF SPACE

This would give your Random Image of Space from NASA's Website. Remember you would only get URL of the image only!

console.log(factful.image())

Ouput would be like this:

https://www.nasa.gov/sites/default/files/styles/image_card_4x3_ratio/public/thumbnails/image/hubble_friday_03042016.jpg

2. RANDOM FACTS ABOUT SPACE, DOGS, CATS, COVID-19 OR ALL OF THEM

THIS WOULD GIVE FACTS ON THE CATEOGARIES OF

  • Space
  • Cat
  • Dog
  • COVID-19

2.1. GETTING ONE PATICULAR TYPE OF RANDOM FACT

console.log(factful.fact('space'))

Output would be like this:

If a star passes too close to a black hole, it can be torn apart.

You can replace the space from console.log(factful.fact('space')) to cat, dog or covid.

In case if you enter any kind of type except cat, dog, space or covid you would get error as given below

You haven't provided a valid type. Types you can use are 'space', 'covid', 'cat' or 'dog'.

2.2. GETTING RANDOM FACT FROM ANY CATEOGARIES

console.log(factful.fact())

Output would be like this:

Female cats tend to be right pawed, while male cats are more often left pawed

FINAL INFO

These are the only functions operational currently, we will develope more function but for now it's ok. If you get any errors which was supposed to be correct contact us by joining our Discord Server :D

Invite to our Discord Server