1.1.0 • Published 3 years ago

get-random-quotes v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

This package can generate upto a thousand quotes for you on one call.

Installation

npm i get-random-quotes

How to use.

let {getSingleQuote, getTenQuotes, getHundredQuotes, getThousandQuotes} = require("get-random-quotes");

// To get one random quote you do:

let singleQuote = getSingleQuote;

This returns an array which you can loop through, example:

singleQuote.forEach(quoteObj => {

//you can get the quote object like so

console.log(quoteObj) //  { quote: "You can't always get what you want, but if you try sometimes, you might find, you get what you need.,
author: 'Mick Jagger' }

});

// To get ten random Quote you simply call the:

"getTenQuotes" // Returns an array like the getSingleQuote.

// To get hundred random quotes you simply call the:

"getHundredQuotes" // Returns an array like the getSingleQuote.

// To get thousand random quotes you simply call the:

"getThousandQuotes" // Returns an array like the getSingleQuote.