Skip to content

srebughini/BEERQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis (.org) npm npm GitHub CodeFactor

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.

About

A Javascript library to randomly generate beer quotes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published