A library for homebrew beer calculations using Node.js or a web browser. Features:
You can install BrauHaus.js using
npm install brauhaus
Here is an example of how to use the library in a browser. Be sure to copy the
lib/brauhaus.min.js file onto the web server. This example assumes it is accessible via
Here is an example of how to use the library from CoffeeScript:
require 'brauhaus'r =name: 'My test brew'description: 'A new test beer using BrauHaus.js!'batchSize: 20.0boilSize: 10.0radd 'fermentable'name: 'Extra pale liquid extract'color: 2.5weight: 4.2yield: 78.0rcalculateconsolelog "Original Gravity: "consolelog "Alcohol: % by volume"
Recipe = require'brauhaus'Recipevar r =name: 'My test brew'description: 'A new test beer using BrauHaus.js!'batchSize: 20.0boilSize: 10.0;radd'fermentable'name: 'Extra pale liquid extract'color: 2.5weight: 4.2yield: 78.0;rcalculate;console.log'Original Gravity: ' + rogtoFixed3;console.log 'Alcohol: ' + rabv + ' by volume';
Copyright (c) 2013 Daniel G. Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.