brewfacts
v1.0.5
Published
Your one stop package for random facts about the worlds best beverage
Downloads
5
Readme
🍺 Brewfacts 🍺
What better way to learn about creating and publishing NPM packages than through the wonderful world of beer.
My first ever NPM package gives you access to fun facts about the world's historically most cherished beverage, available in a variety of categories. No longer will my incessant and boundless stream of beer facts be contained to just my own friends and family, but will now be unleashed into your application!
Usage
To utilize the included fact sets and methods, import them as shown below.
const { brewfacts } = require("brewfacts");
Current Categories
history
- Learn about the wide and surprisingly old history of beer from every corner of the world.
brewing
- Before you hit the local brewery for a tour, brush up on some facts about how beer is made.
styles
- What even is an IPA??? Let brewfacts help you sort out what different kinds of beer bring to the table.
breweries
- Don't know where to go next? Let brewfacts guide you to a new brewery.
Data access
Access the entire array of facts in any given category.
brewfacts.categories.CATEGORY.facts;
All facts combined into one array.
brewfacts.categories.all;
A list of breweries with their location and a reccommended brew.
brewfacts.breweries;
Methods
return
a random fact from a category of your choice.
brewfacts.randomFactByCategory(categories.CATEGORY);
return
a random fact from across all categories.
brewfacts.randomFactByAll();
return
a random brewery reccommendation object.
brewfacts.reccommendRandomBrewery();
// Returns an object like this:
{
name: "Sun King Brewery",
city: "Indianapolis",
state: "Indiana",
whatToTry: "Velour Soccer Mom - Fruited Sour",
oneLine: `${brewery.name} - ${brewery.city}, ${brewery.state}\nWhat to try: ${brewery.whatToTry}`;
}
return
a brewery reccommendation object within a given state.
brewfacts.reccommendBreweryByState("TN");
Print a full pint to the console!
brewfacts.cheers();