Skip to content

AnilSeervi/inspirational-quotes

Repository files navigation

⚡ Inspirational Quotes ⚡

Get Inspired!

NPM VERSION GitHub license Snyk Vulnerabilities for npm package version npm PRs Welcome

Inspirational-Quotes NPM package example

Installation

NPM:

npm install @anilseervi/inspirational-quotes

Yarn:

yarn add @anilseervi/inspirational-quotes

Usage

Check out all the existing quotes.

Following exports are available from the module:

  • getAll() - returns all quotes
  • getRandom() - 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!"
}

Example

// Use require or import, either works
import { getAll, getRandom } from '@anilseervi/inspirational-quotes'

console.log(`All quotes`, getAll())
console.log(`A random quote`, getRandom())

Contributing

Contributions are welcome! Please read the contributing guidelines first.

Author