get-random-quotes
v1.1.0
Published
This package randomly generates quotes...
Downloads
3
Maintainers
Readme
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.