JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q50821F

A small library providing utility methods to calculate bitterness ibu of brew recipe

Package Exports

  • bitterness

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bitterness) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.

Installation

    npm install bitterness

Usage

  var bitterness = require('bitterness');
  // ibu value with rager formula
  var rager = bitterness.rager(hop_grams, // grams of hop
                               time, // time in minutes
                               alpha_acids, // AA% in the form of % (e.g. 6% => 6)
                               batch_size, // size of the batch in liters
                               original_gravity); // OG in the form xxxx.xx (e.g. 1050.00)
  // ibu value with tinseth formula
  var tinseth = bitterness.tinseth(hop_grams, // grams of hop
                               time, // time in minutes
                               alpha_acids, // AA% in the form of % (e.g. 6% => 6)
                               batch_size, // size of the batch in liters
                               original_gravity);
  // ibu value using both formulas
  var average = bitterness.average(hop_grams, // grams of hop
                               time, // time in minutes
                               alpha_acids, // AA% in the form of % (e.g. 6% => 6)
                               batch_size, // size of the batch in liters
                               original_gravity);

Test

  npm test

Release History

  * 0.1.0 Initial release.
  * 0.1.2 Better organization, privatized some functions, writing test.
  * 0.1.4 Module pattern design. Updated usage section.