0.0.27 • Published 2 years ago

@widlestudiollp/health-calculation v0.0.27

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

Health Calculations

Version

Downloads

Try on RunKit

Installation

Install the package with:

npm install @widlestudiollp/health-calculation --save
# or
yarn add @widlestudiollp/health-calculation

Fitness

  1. BMI Calculator
  2. Body Fat Calculator
  3. BMR Calculator
  4. Ideal Weight Calculator
  5. Pace Calculator
  6. Army Body Fat Calculator
  7. Calorie Calculator
  8. Lean Body Mass Calculator
  9. Healthy Weight Calculator
  10. Calories Burned Calculator

Pregnancy

  1. Pregnancy Calculator
  2. Pregnancy Weight Gain Calculator
  3. Conception Calculator
  4. Estimate Delivery Date Calculator
  5. Ovulation Calculator
  6. Period Calculator

Other

  1. Macro Calculator
  2. Carbohydrate Calculator
  3. Protein Calculator
  4. Fat Intake Calculator
  5. TDEE Calculator
  6. GFR Calculator
  7. Body Type Calculator
  8. Body Surface Area Calculator
  9. BAC Calculator

Fitness

1. BMI Calculator

ParameterTypeDescription
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.bmi(weight, weightType, height, heightTypes)

the result is :

1233.06;

2. Body Fat Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.bodyFat(gender,age,weight, weightType, height, heightTypes)

the result is :

1469.31;

3. BMR Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.bmr(gender,age,weight, weightType, height, heightTypes)

the result is :

305.06;

4. Ideal Weight Calculator

ParameterTypeDescription
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.idealWeight(weight, weightType, height, heightType)

the result is :

"You are not over 5 feet";

5. Pace Calculator

ParameterTypeDescription
distancenumberRequired. distance covered by a person.
distanceTypestringRequired. distanceType (miles , kms , meters) covered by a person.
timenumberRequired. time taken by a person
timeTypestringRequired. timeType (sec , min , hour) covered by a person.

Example :

distance : 55,
distanceType : "miles",
times : 5.6,
timeType : "min"

health_calc.pace(distance, distanceType, times, timeType)

the result is :

3.8;

6. Army Body Fat Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person
waistnumberRequired. waist size of a person
necknumberRequired. neck size of a person
sizeTypestringRequired. sizeType (Meters , Inches) of a person
hipnumberRequired. hip size of a Female only

Example :

gender : "Male" ,
height : 5.6,
heightType : "Inches",
waist : 5,
neck : 6,
type : "Inches"

health_calc.armyBody(gender, height, heightTypes, waist, neck, type, hip)

the result is :

92.32;

7. Calorie Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person
exercisenumberRequired. No. of days (0-7) person do exercise

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches",
exercise : 1

health_calc.calorie(gender,age,weight, weightType, height, heightTypes , exercise )

the result is :

299.04;

8. Lean Body Mass Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

gender : "Male",
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.lbm(gender, weight, weightType, height, heightTypes)

the result is :

-5.24;

9. Healthy Weight Calculator

ParameterTypeDescription
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.healthyWeight(weight, weightType, height, heightTypes)

the result is :

"Obese";

10. Calories Burned Calculator

ParameterTypeDescription
activitystringRequired. activity(Sleeping, Walking, Eating, Running, Other Heavy Work , Other Light Work) done by person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person

Example :

activity : "Sleeping"
weight : 55,
weightType : "Pound"

health_calc.caloriesBurn(activity, weight, weightType)

the result is :

8.3;

Pregnancy

1. Pregnancy Calculator

ParameterTypeDescription
datestringRequired. First Day of Your Last Period
scalenumberRequired. Average Length of Cycles (22-44)

Example :

date : "01/01/2023" ,
scale : 27

health_calc.pregnancy(date, scale )

the result is :

{
  currentWeek: '12',
  currentDate: '22/03/2023',
  conceivedBaby: '14/01/2023',
  pregnancyPercentage: '29',
  trimester: 'First Trimester',
  milestone: 'No milestone reached'
}

2. Pregnancy Weight Gain Calculator

ParameterTypeDescription
currentWeightnumberRequired. currentWeight of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

currentWeight : 56,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.pregnancyWeightGain(currentWeight, weight, weightType, height, heightTypes)

The result is :

["1233.06 (Obese)", "58.97 kg", "30.7 kg - 33.1 kg"];

3. Conception Calculator

ParameterTypeDescription
datestringRequired. First Day of Your Last Period
scalenumberRequired. Average Length of Cycles (22-44)

Example :

date : "01/01/2023" ,
scale : 25

health_calc.conception(date, scale )

the result is :

["07/01/2023 - 12/01/2023"];

4. Estimate Delivery Date Calculator

ParameterTypeDescription
datestringRequired. First Day of Your Last Period
scalenumberRequired. Average Length of Cycles (22-44)

Example :

date : "01/01/2023" ,
scale : 27

health_calc.estimateDate(date, scale )

the result is :

 {
  estimateDeliveryWeek: '40',
  estimateDeliveryDate: '07/10/2023',
  currentWeek: '12',
  currentDate: '22/03/2023',
  conceivedBaby: '14/01/2023',
  pregnancyPercentage: '29',
  trimester: 'First Trimester',
  milestone: 'No milestone reached'
}

5. Ovulation Calculator

ParameterTypeDescription
datestringRequired. First Day of Your Last Period
scalenumberRequired. Average Length of Cycles (22-44)

Example :

date : "01/01/2023" ,
scale : 25

health_calc.ovulation(date, scale )

the result is :

["07/01/2023 - 11/01/2023", "09/01/2023"];

6. Period Calculator

ParameterTypeDescription
startdatestringRequired. First Day of Your Last Period
periodDaysnumberRequired. How long did it last? (1-10)
cycleLengthnumberRequired. Average Length of Cycles (22-44)
monthnumberRequired. Upcoming Months.

Example :

date : "01/01/2023",
periodDays : 5,
cycleLength : 22,
month : 6

health_calc.period(date, periodDays , cycleLength , month )

the result is :

[
  {
    period: "1/1/2023 - 1/5/2023",
    mostProbableOvulationDays: "1/7/2023 - 1/11/2023",
  },
  {
    period: "1/23/2023 - 1/27/2023",
    mostProbableOvulationDays: "1/29/2023 - 2/2/2023",
  },
  {
    period: "2/14/2023 - 2/18/2023",
    mostProbableOvulationDays: "2/20/2023 - 2/24/2023",
  },
  {
    period: "3/8/2023 - 3/12/2023",
    mostProbableOvulationDays: "3/14/2023 - 3/18/2023",
  },
  {
    period: "3/30/2023 - 4/3/2023",
    mostProbableOvulationDays: "4/5/2023 - 4/9/2023",
  },
  {
    period: "4/21/2023 - 4/25/2023",
    mostProbableOvulationDays: "4/27/2023 - 5/1/2023",
  },
];

Other

1. Macro Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
goalstringRequired. goal (Bulking or Cutting) of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person

Example :

gender : "Male",
goal : "Cutting"
weight : 55,
weightType : "Pound"

health_calc.macro(gender, goal, weight, weightType)

the result is :

[121.25, "30.9375 g", 123.75, "-0.75", "-0.08 g", "-0.4375 g"];

2. Carbohydrate Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person
exercisenumberRequired. No. of days (0-7) person do exercise

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches",
exercise : 1

health_calc.carbohydrate(gender, age, weight, weightType, height, heightTypes , exercise )

the result is :

["299.04", "37.38 g", "33.64 g - 48.59 g"];

3. Protein Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
activitystringRequired. activity (Sedentary adults, Endurance athletes , Strength athletes or Pregnant and lactating women (only for female)) of a person

Example :

activity : "Sedentary adults",
gender : "Male"
weight : 55,
weightType : "Pound"

health_calc.protein(gender, weight, weightType, activity)

the result is :

"19.80 grams";

4. Fat Intake Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person
exercisenumberRequired. No. of days (0-7) person do exercise

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches",
exercise : 1

health_calc.fat(gender, age, weight, weightType, height, heightTypes , exercise )

the result is :

["299.04", "9.97 g", "6.65 g - 11.63 g"];

5. TDEE Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person
exercisenumberRequired. No. of days (0-7) person do exercise

Example :

gender : "Male" ,
age : 26,
weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches",
exercise : 1

health_calc.tdee(gender, age, weight, weightType, height, heightTypes , exercise )

the result is :

"293.70 kcal/day";

6. GFR Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
agenumberRequired. age of a person
ScrnumberRequired. Scr of a person
colorstringRequired. color (Black or Not Black) of a person

Example :

Color : "Black",
gender : "Male"
Scr : 55,
age : 26

health_calc.protein(gender, age, Scr, Color)

the result is :

"123.62 mL/min/1.73 m2";

7. Body Type Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
typestringRequired. type (cm , inches) of a person
bustnumberRequired. bust size of a person
waistnumberRequired. waist size of a person
necknumberRequired. neck size of a person
hipsnumberRequired. hips size of a person
highHipnumberRequired. highHip size of a person

Example :

gender : "Male" ,
waist : 32,
bust : 34,
neck : 6,
type : "inches",
hip : 34,
highHip : 34

health_calc.bodyType(gender, type, bust, waist, neck, hip, highHip)

the result is :

["Hourglass", "0.71 (  Low Health Risk ) "];

8. Body Surface Area Calculator

ParameterTypeDescription
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
heightnumberRequired. height of a person
heightTypestringRequired. heightType (Feet , Inches or Meters ) of a person

Example :

weight : 55,
weightType : "Pound",
height : 5.6,
heightType : "Inches"

health_calc.bsa(weight, weightType, height, heightTypes)

the result is :

"0.19 m2";

9. BAC Calculator

ParameterTypeDescription
genderstringRequired. gender of a person
weightnumberRequired. weight of a person
weightTypestringRequired. weightType (Pound or Kgs) of a person
alcoholnumberRequired. alcohol taken by a person
timenumberRequired. time taken by a person
timeTypestringRequired. timeType (hr , min or sec ) taken by a person

Example :

gender : "Male" ,
alcohol : 26,
weight : 55,
weightType : "Pound",
time : 5.6,
timeType : "hr"

health_calc.tdee(gender, weight, weightType, alcohol, time , timeType )

the result is :

10.24;

License

GNU General Public License v3.0

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago