ot", "cocktail" => nil}
{"beer" => {abv: 5.0, default_ml: 330}, "cider" => {abv: 5.0, default_ml: 440}, "wine" => {abv: 12.5, default_ml: 150}, "spirits" => {abv: 40.0, default_ml: 50}, "liqueur" => {abv: 25.0, default_ml: 50}, "cocktail" => {abv: 12.0, default_ml: 200}, "seltzer" => {abv: 5.0, default_ml: 355}}
Category defaults
0.789
{"shot" => 50, "shots" => 50, "bottle" => 330, "bottles" => 330, "pint" => 568, "pints" => 568, "glass" => 150, "glasses" => 150, "can" => 330, "cans" => 330, "unit" => 1, "units" => 1}
Serving sizes in ml
Get all brand names
Full alcohol dose calculation Input: dosage string, substance name, optional ABV override Returns: {grams, annotation} or nil
Calculate alcohol grams from volume and ABV
Get the default serving unit for a brand based on its category
Get category defaults
Check if a substance is an alcoholic beverage
Load alcohol data from embedded JSON
Lookup a brand by name
Parse ABV from string like "5%", "5.5%", "40"
Parse dosage string like "2pints", "500ml", "1bottle" Returns {count, serving_type, volume_ml} or nil if not parseable
Full alcohol dose calculation Input: dosage string, substance name, optional ABV override Returns: {grams, annotation} or nil
Calculate alcohol grams from volume and ABV
Get the default serving unit for a brand based on its category
Get category defaults
Lookup a brand by name
Parse ABV from string like "5%", "5.5%", "40"
Parse dosage string like "2pints", "500ml", "1bottle" Returns {count, serving_type, volume_ml} or nil if not parseable