bmi-calculator-api
v1.0.0
Published
A simple BMI (Body Mass Index) Calculator API using Node.js and Express
Maintainers
Readme
BMI Calculator API
A simple BMI (Body Mass Index) Calculator API built using Node.js and Express.
Features
- Accepts weight (kg) and height (feet in decimal format) as input
- Converts feet and inches to meters automatically
- Calculates BMI using the standard formula
- Returns BMI value along with category (Underweight, Normal, Overweight, Obese)
Installation
const { calculateBodyMassIndex } = require("bmi-calculator-api");
const {weight,height}=req.body;
const result = await calculateBodyMassIndex(weight,height);
exp
{
"weight":70,
"height":5.7
}