Nutrition
Simple nutrition facts wrapper as an NPM module.
Installation
npm install nutrition --save
Usage
import * as nutrition from 'nutrition'
const value = nutrition.bmi(75, 1.75)
var nutrition = require('nutrition')
var value = nutrition.bmi(75, 1.75)
Methods
bmi(weight, height, eng)
If eng (for English BMI style) is true then:
- weight is used in pounds, otherwise in kilograms.
- height is used in inches, otherwise in meters.
bmiClass(bmi)
Returns the class for the bmi value. Possible results are:
-
Underweight, Normal, Overweight, Obese 1 Class, Obese 2 Class, Morbid Obesity
Next steps
- Set of healthy methods
- Coverage
Contributing
Please see CONTRIBUTING.
LICENSE
MIT, see LICENSE.