2.0.1 • Published 1 year ago

beerq v2.0.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

1. Installation

BeerQ is part of the ASALI project and it is a JavaScript library to get beer related quotes in different languages. You can check some of them here.
Its npm package can be installed as follow:

npm i beerq

The main advanntage of using BeerQ is that all quotes are hardcoded in JS variables, allowing the inclusion of BeerQ in any web application.

2. Examples

The use of BeerQ is pretty straightforward, but here you can find an example that might help:

import { BeerQuote } from "beerq"

// Generate beer quotes object with the language of your website
let beerQuote = BeerQuote("eng");

// Extract list of authors
let authorList = beerQuote.getAuthorList();

// Extract a random quote
let randomQuote = beerQuote.getRandomQuote();

// Extract quotes of a specific author
let authorQuotes = beerQuote.getQuotesFromAuthor("Benjamin Franklin");

// Extract a random quote of a specific author
let randomAuthorQuote = beerQuote.getRandomQuoteFromAuthor("W. C. Fields");

3. Contacts

If you want to contribute, ask questions, report bugs or just drink a beer with us feel free to open an issue.

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago