Bitterness
A basic library providing utility methods to calculate bitterness of a given recipe, in IBU measure unit, featuring Rager forumula, Tinseth formula or an average of the two, Garetz formula is also available. Measure system is defaulted at European decimal system, supports Imperial system too.
Installation
npm install bitterness# for development purpose install (e.g. running tests) need mocha and chai npm install bitterness --dev
Usage
var bt = ;// ibu value with Rager formulavar rager = bt; // OG in the form xxxx.xx (e.g. 1050.00)// ibu value with Tinseth formulavar tinseth = bt; // OG in the form xxxx.xx (e.g. 1050.00)// ibu value using Garetz formulavar garetz = bt; // height in meters of the boiling batch
Practical example:
var bt = ;var rager = btrager;// 93 grams, 90 minutes boil time, 6% alpha acids, 25 liters batch, 1050 ogvar r = ;var g = bt; // using defaulted final volume = (batch size - 10%) and height = 0 console; // ~ 71 ibuconsole; // ~ 49 ibu bt; // set system to imperial// 3.17 oz, 90 minutes, 6% alpha acids, 6.60 gallons, 1050 ogvar r = ;
Test
npm test
Changelog
See the CHANGELOG file.
License
See the LICENSE-MIT file for license rights and limitations (MIT).