Get inspired!
yarn add @divyanshu013/inspirational-quotes
Check out all the existing quotes or the random quote demo.
Following exports are available from the module:
getAll()
- returns all quotesgetRandom()
- returns a random quote
The result is in the following shape:
{
"quote": "Always bet on JavaScript!",
"author": "Brendan Eich"
}
Some quotes also have a source
key. For example:
{
"quote": "Life moves pretty fast. If you don’t stop and look around once in a while, you could miss it.",
"author": "Ferris Bueller",
"source": "Ferris Bueller’s Day Off"
}
// Use require or import, either works
const { getAll, getRandom } = require('@divyanshu013/inspirational-quotes');
console.log('All quotes', getAll());
console.log('A random quote', getRandom());
- @divyanshu013 👋
Icons made by DinosoftLabs from www.flaticon.com