cs-random-quote-generator
v1.1.0
Published
An npm package to generate a random quote.
Downloads
13
Readme
cs-random-quote-generator
This is an npm package which can be used to get a random quote along with the author of that quote.
Installation
Installation
npm install cs-random-quote-generator
Usage/Examples
const getRandomQuote = require('cs-random-quote-generator');
async function fetchAndDisplayQuote() {
try {
const quote = await getRandomQuote();
console.log(`"${quote.quoteText}" - ${quote.quoteAuthor}`);
} catch (error) {
console.error('Failed to fetch quote:', error);
}
}
fetchAndDisplayQuote();