NPM:
npm install @anilseervi/inspirational-quotes
Yarn:
yarn add @anilseervi/inspirational-quotes
Check out all the existing quotes.
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 optionally have the source
key. For example:
{
"quote": "Amateurs know that contributing something is better than contributing nothing.",
"author": "Austin Kleon",
"source": "Show Your Work!"
}
// Use require or import, either works
import { getAll, getRandom } from '@anilseervi/inspirational-quotes'
console.log(`All quotes`, getAll())
console.log(`A random quote`, getRandom())
Contributions are welcome! Please read the contributing guidelines first.
- 🙌 @anilseervi 🔵