@mohdnajwan/bmi-calculator
v1.0.2
Published
BMI calculator that accepts metric and imperial units
Maintainers
Readme
@mohdnajwan/bmi-calculator
A BMI calculator that accept metric and imperial units
Install
$ npm install @mohdnajwan/bmi-calculatorImport
const { BMI } = require('@mohdnajwan/bmi-calculator')Usage
Metric units weight in kg and height in meter
// BMI(weight, height)
const myBMI = BMI(52.2,1.72)
// => 17.2Imperial units Weight in lbs and height in inch. Just add 'imperial' in the parameter after height.
// BMI(weight,height,unit)
const myBMI = BMI(114.64, 67.7, 'imperial')
// => 17.2