1.0.2 • Published 5 years ago
@mohdnajwan/bmi-calculator v1.0.2
@mohdnajwan/bmi-calculator
A BMI calculator that accept metric and imperial units
Install
$ npm install @mohdnajwan/bmi-calculator
Import
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.2
Imperial 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