
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
bitterness
Advanced tools
A small library providing utility methods to calculate bitterness ibu of brew recipe
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.
npm install bitterness
# for development purpose install (e.g. running tests) need mocha and chai
npm install bitterness --dev
var bt = require('bitterness');
// ibu value with Rager formula
var rager = bt.rager(
hopWeight, // grams of hop
time, // time in minutes
alphaAcids, // AA% in the form of % (e.g. 6% => 6)
batchSize, // size of the batch in liters
originalGravity); // OG in the form xxxx.xx (e.g. 1050.00)
// ibu value with Tinseth formula
var tinseth = bt.tinseth(
hopWeight, // grams of hop
time, // time in minutes
alphaAcids, // AA% in the form of % (e.g. 6% => 6)
batchSize, // size of the batch in liters
originalGravity); // OG in the form xxxx.xx (e.g. 1050.00)
// ibu value using Garetz formula
var garetz = bt.garetz(
hopWeight, // grams of hop
time, // time in minutes
alphaAcids, // AA% in the form of % (e.g. 6% => 6)
batchSize, // size of the batch in liters
originalGravity, // OG in the form xxxx.xx (e.g. 1050.00)
final_volume // size of the volume post boil in liters
height); // height in meters of the boiling batch
Practical example:
var bt = require('bitterness');
var rager = bt.rager;
// 93 grams, 90 minutes boil time, 6% alpha acids, 25 liters batch, 1050 og
var r = rager(93, 90, 6, 25, 1050);
var g = bt.garetz(93, 90, 6, 25, 1050); // using defaulted final volume = (batch size - 10%) and height = 0
console.log(r); // ~ 71 ibu
console.log(g); // ~ 49 ibu
bt.setMetricSystem(false); // set system to imperial
// 3.17 oz, 90 minutes, 6% alpha acids, 6.60 gallons, 1050 og
var r = rager(3.17, 90, 6, 6.60, 1050);
npm test
See the CHANGELOG file.
See the LICENSE-MIT file for license rights and limitations (MIT).
FAQs
A small library providing utility methods to calculate bitterness ibu of brew recipe
We found that bitterness demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.