yiler-huang-nutrition-calculator

This semester, we programmed a nutrition calculator. It calculates the nutritional value different ingredients have in a recipe and outputs the information in a way that an average person can understand. For example the program outputs the weight of a dish, calories, protein, carbohydrates, fats, etc. into a list. This is done by inputting all the different kinds of ingredients we used in a recipe, we used fried rice as an example. After that, the program will apply the different inputs into the calculator by referencing a library of average nutritional values of the foods. This library of ingredients is made from putting different foods and their individual nutritional values onto a space in the program called a database. This way, the program can take the information it needs more easily. In the future, with a large enough database of ingredients or recipes, this program might be able to calculate a wider variety of foods.

While programming this calculator, I learned many things. I learned how to combine different functions and classes in Javascript to achieve the results that I was looking for. For example, I modified a code we have for arrays, a code used to store a lot of information through numbers, and made it so that it refers to the nutritional values of the ingredients we put in. I also learned how to apply math equations into my program so I could save a lot of time on doing calculations manually. For example, I used the equation for finding the ratio of two different numbers in my program so the weight variable of my inputs could be any number as long as it is the right ratio. I also learned about eating healthy during the preparation phase before we started programming. Lastly I noticed that I often misspelled words leading to errors in my code, so I think I might need to work on my typing skills a little bit more.

The benefits of having a nutritional calculator is that you could get a rough idea of how healthy or unhealthy the foods you’re eating are. It helps people control their diet and could be useful for people with special goals. For example, a body builder could use this program to calculate or to get a better idea of how much more protein they need to get their desired muscle gain. For me, the program could be a tool that helps me manage how many calories I should eat. I have a fairly unhealthy diet that is full of junk food. Maybe having a calculator like this will help me with the amount that I consume on a daily basis.

Even though we have spent a lot of time making this program, I think there are still some points that could be improved. For example, we could have a larger database of ingredients and a separate database of well known recipes so we don’t need to input as much information into the program for it to start calculating. I think that would be a point of improvement because the code at this moment could only calculate a limited range of foods. We can try to make it so that when we type in the name of the food and the weight we are consuming, it will pull information from the recipe database which will have the most common ingredients available. It will then get the information from the ingredients database which will have the average nutritional values and calculate the nutrition of the dish through the weight we have inputted. I believe by doing this, this program will have more uses on calculating different nutritional values in many different kinds of foods and can be used on a wider scale.

Coding this program has taught me how to program more efficiently so we don’t need to do too much manual calculations. This project also seems to have huge potential if we could spend more time on it. The program can help many people become healthier if they follow the recommended daily nutritional intake. Throughout the process, I have learned much about both coding and myself. My problems when typing will require some practice to improve. But, if I work harder, I believe that I could achieve my goals in the future as I felt that my coding skills have improved after completing this project.

class Ingredient {
    constructor (nutritionData,totalAmount){
        this.name = nutritionData.name;
        this.totalAmount = totalAmount;
        this.weight = nutritionData.weight;
        this.calories = nutritionData.calories;
        this.proteinInG = nutritionData.proteinInG;
        this.caloriesFromProtein = nutritionData.caloriesFromProtein;
        this.carbInG = nutritionData.carbInG;
        this.caloriesFromCarb = nutritionData.caloriesFromCarb;
        this.fatInG = nutritionData.fatInG;
        this.caloriesFromFat = nutritionData.caloriesFromFat;
        this.fiberInG = nutritionData.fiberInG;
        this.caloriesFromFiber = nutritionData.caloriesFromFiber;
        this.sodiumInMg = nutritionData.sodiumInMg;
        this.ironInMg = nutritionData.ironInMg;
        this.calciumInMg = nutritionData.calciumInMg;
        this.vitaminCInµg = nutritionData.vitaminCInµg;
        this.vitaminDInµg = nutritionData.vitaminDInµg;
        let tOverE = this.totalAmount/this.weight;
        let calInPer = this.calories/this.weight;
        this.weight = this.totalAmount;
        this.calories = this.weight * calInPer;
        this.proteinInG = this.proteinInG * tOverE;
        this.caloriesFromProtein = this.proteinInG * 4;
        this.carbInG = this.carbInG * tOverE;
        this.caloriesFromCarb = this.carbInG * 4;
        this.fatInG = this.fatInG * tOverE;
        this.caloriesFromFat = this.fatInG * 9;
        this.fiberInG = this.fiberInG * tOverE;
        this.caloriesFromFiber = this.fiberInG * 2;
        this.sodiumInMg = this.sodiumInMg * tOverE;
        this.ironInMg = this.ironInMg * tOverE;
        this.calciumInMg = this.calciumInMg * tOverE;
        this.vitaminCInµg = this.vitaminCInµg * tOverE;
        this.vitaminDInµg = this.vitaminDInµg * tOverE;
    }
    print (){
        console.log(" ", "\n" + "weight: " + this.weight + "g", "\n", "calories: " + this.calories + "cal", "\n", "weight of protein: " + this.proteinInG + "g", "\n", "calories from protein: " + this.caloriesFromProtein + "cal", "\n", "Weight of carb: " + this.carbInG + "g", "\n", "calories from carb: " + this.caloriesFromCarb + "cal", "\n", "weight of fat: " + this.fatInG + "g", "\n", "calories from fat: " + this.caloriesFromFat + "cal");
//        if (this.nutritionData[8] == "round"){console.log("number rounded")}
//        else {console.log("number not rounded")}
        return this
    }
   }
 
class NutritionData {
    constructor (nutritionData){
        this.name = "" + nutritionData[0]
        this.weight = nutritionData[1];
        this.calories = nutritionData[2];
        this.proteinInG = nutritionData[3];
        this.caloriesFromProtein = this.proteinInG * 4;
        this.carbInG = nutritionData[4];
        this.caloriesFromCarb = this.carbInG * 4;
        this.fatInG = nutritionData[5];
        this.caloriesFromFat = this.fatInG * 9;
        this.fiberInG = nutritionData[6];
        this.caloriesFromFiber = this.fiberInG * 2;
        this.sodiumInMg = nutritionData[7];
        this.ironInMg = nutritionData[8];
        this.calciumInMg = nutritionData[9];
        this.vitaminCInµg = nutritionData[10];
        this.vitaminDInµg = nutritionData[11];
    }
    //print (){
      //  console.log("name: " + this.name + " ", "\n" + "weght: " + this.weight + "g", "\n", "calories: " + this.calories + "cal", "\n", "weight of protein: " + this.proteinInG + "g", "\n", "calories from protein: " + this.caloriesFromProtein + "cal", "\n", "weight of carb: " + this.carbInG + "g", "\n", "calories from carb: " + this.caloriesFromCarb + "cal", "\n", "weight of fat: " + this.fatInG + "g", "\n", "calories from fat: " + this.caloriesFromFat + "cal");
        //return
    }
 
function sumArrayForClasses (inputArray,property) {
  let sum = 0;
  for (let i = 0; i < inputArray.length; i++) {
    sum = sum + inputArray[i][property]
  }
  return sum}
 
 
class DishData {
    constructor (dishName,dishArray,forHowManyServing){
        this.inputs = dishArray.filter(a => a != undefined);
        this.name = dishName;
        this.ingredients = [];
        for (let u = 0; u < this.inputs.length; u ++){
            this.ingredients.push("" + this.inputs[u].name + ":" + "" + this.inputs[u].weight + "g")
        }
        this.weight = sumArrayForClasses (this.inputs,'weight')/forHowManyServing;
        this.calories = sumArrayForClasses (this.inputs,'calories')/forHowManyServing;
        this.proteinInG = sumArrayForClasses (this.inputs,'proteinInG')/forHowManyServing;
        this.caloriesFromProtein = sumArrayForClasses (this.inputs,'caloriesFromProtein')/forHowManyServing;
        this.carbInG = sumArrayForClasses (this.inputs,'carbInG')/forHowManyServing;
        this.caloriesFromCarb = sumArrayForClasses (this.inputs,'caloriesFromCarb')/forHowManyServing;
        this.fatInG = sumArrayForClasses(this.inputs,'fatInG')/forHowManyServing;
        this.caloriesFromFat = sumArrayForClasses(this.inputs,'caloriesFromFat')/forHowManyServing;
        this.fiberInG = sumArrayForClasses(this.inputs,"fiberInG")/forHowManyServing;
        this.caloriesFromFiber = sumArrayForClasses(this.inputs,"caloriesFromFiber");
        this.sodiumInMg = sumArrayForClasses(this.inputs,"sodiumInMg")/forHowManyServing;
        this.ironInMg = sumArrayForClasses(this.inputs,"ironInMg")/forHowManyServing;
        this.calciumInMg = sumArrayForClasses(this.inputs,"calciumInMg")/forHowManyServing;
        this.vitaminCInµg = sumArrayForClasses(this.inputs,"vitaminCInµg")/forHowManyServing;
        this.vitaminDInµg = sumArrayForClasses(this.inputs,"vitaminDInµg")/forHowManyServing;
        if (this.sodiumInMg >= 1000){
            this.sodiumInG = this.sodiumInMg/1000;
            delete this.sodiumInMg;
        }
        if (this.ironInMg >= 1000){
            this.ironInG = this.ironInMg/1000;
            delete this.ironInMg;
        }
        if (this.calciumInMg >= 1000){
            this.calciumInG = this.calciumInMg/1000;
            delete this.calciumInMg;
        }
        if (this.vitaminCInµg >= 1000){
            this.vitaminCInMg = this.vitaminCInµg/1000;
            delete this.vitaminCInµg;
        }
        if (this.vitaminDInµg >= 1000){
            this.vitaminDInMg = this.vitaminDInµg/1000;
            delete this.vitaminDInµg;
        }
        delete this.firstInputs;
        delete this.inputs
    }
    print(){
        console.log("dish name: " + this.name + " ", "\n" + "weight: " + this.weight + "g", "\n", "calories: " + this.calories + "cal", "\n", "weight of protein: " + this.proteinInG + "g", "\n", "calories from protein: " + this.caloriesFromProtein + "cal", "\n", "weight of carbohydrates: " + this.carbInG + "g", "\n", "calories from carbohydrates: " + this.caloriesFromCarb + "cal", "\n", "weight of fat: " + this.fatInG + "g", "\n", "calories from fat: " + this.caloriesFromFat + "cal");
    }
}
 
class PrettyPrinting {
    constructor (input){
        this.input = input
        this.name = `name: ${input.name}`;
        if (input.ingredients != undefined){
            this.ingredients = `ingredients of the dish: ${input.ingredients}`
        }
        this.weight = `weight: ${input.weight}g`;
        this.calories = `calories: ${input.calories}cal`;
        this.proteinInG = `weight of protein: ${input.proteinInG}g`;
        this.caloriesFromProtein = `calories from protein: ${input.caloriesFromProtein}cal`;
        this.carbInG = `weight of carbohydrates: ${input.carbInG}g`;
        this.caloriesFromCarb = `calories from carbohydrates: ${input.caloriesFromCarb}cal`;
        this.fatInG = `weight of fat: ${input.fatInG}g`;
        this.caloriesFromFat = `calories from fat: ${input.caloriesFromFat}cal`;
        this.fiberInG = `weight of fiber: ${input.fiberInG}g`;
        this.caloriesFromFiber = `calories from fiber: ${input.caloriesFromFiber}cal`;
        this.sodiumInMg = `weight of sodium: ${input.sodiumInMg}mg`;
        this.sodiumInG = `weight of sodium: ${input.sodiumInG}g`;
        this.ironInMg = `weight of iron: ${input.ironInMg}mg`;
        this.ironInG = `weight of iron: ${input.ironInG}g`;
        this.calciumInMg = `weight of calcium: ${input.calciumInMg}mg`;
        this.calciumInG = `weight of calcium: ${input.calciumInG}g`;
        this.vitaminCInµg = `weight of vitamin C: ${input.vitaminCInµg}µg`;
        this.vitaminCInMg = `weight of vitamin C: ${input.vitaminCInMg}mg`;
        this.vitaminDInµg = `weight of vitamin D: ${input.vitaminDInµg}µg`;
        this.vitaminDInMg = `weight of vitamin D: ${input.vitaminDInMg}mg`;
    }
    print(inputArray){
        let printArray = [];
        if (inputArray.includes("name")){
            printArray.push(this.name);
        }
        if (this.ingredients != undefined && inputArray.includes("ingredients")){
            printArray.push(this.ingredients)
        }
        if (inputArray.includes("weight")){
            printArray.push(this.weight)
        }
        if (inputArray.includes("calories")){
            printArray.push(this.calories);
        }
        if (inputArray.includes("proteinInG")){
            printArray.push(this.proteinInG);
        }
        if (inputArray.includes("caloriesFromProtein")){
            printArray.push(this.caloriesFromProtein);
        }
        if (inputArray.includes("carbInG")){
            printArray.push(this.carbInG);
        }
        if (inputArray.includes("caloriesFromCarb")){
            printArray.push(this.caloriesFromCarb);
        }
        if (inputArray.includes("fatInG")){
            printArray.push(this.fatInG);
        }
        if (inputArray.includes("caloriesFromFat")){
            printArray.push(this.caloriesFromFat);
        }
        if (inputArray.includes("fiberInG")){
            printArray.push(this.fiberInG)
        }
        if (inputArray.includes("caloriesFromFiber")){
            printArray.push(this.caloriesFromFiber)
        }
        if (this.input.sodiumInMg != undefined && inputArray.includes("sodiumWeight")){
            printArray.push(this.sodiumInMg);
        }
        else if (this.input.sodiumInG != undefined && inputArray.includes("sodiumWeight")){
            printArray.push(this.sodiumInG)
        }
        if (this.input.ironInMg != undefined && inputArray.includes("ironWeight")){
            printArray.push(this.ironInMg);
        }
        else if (this.input.ironInG != undefined && inputArray.includes("ironWeight")){
            printArray.push(this.ironInG);
        }
        if (this.input.calciumInMg != undefined && inputArray.includes("calciumWeight")){
            printArray.push(this.calciumInMg);
        }
        else if (this.input.calciumInG != undefined && inputArray.includes("calciumWeight")){
            printArray.push(this.calciumInG)
        }
        if (this.input.vitaminCInµg != undefined && inputArray.includes("vitaminCWeight")){
            printArray.push(this.vitaminCInµg)
        }
        else if (this.input.vitaminCInMg != undefined && inputArray.includes("vitaminCWeight")){
            printArray.push(this.vitaminCInMg)
        }
        if (this.input.vitaminDInµg != undefined && inputArray.includes("vitaminDWeight")){
            printArray.push(this.vitaminDInµg)
        }
        else if (this.input.vitaminInMg != undefined && inputArray.includes("vitaminDWeight")){
            printArray.push(this.vitaminDInMg)
        }
        printArray.forEach(e => console.log(e))
//        console.log("name: " + this.name + " ", "\n" + "weight: " + this.weight + "g", "\n", "calories: " + this.calories + "cal", "\n", "weight of protein: " + this.proteinInG + "g", "\n", "calories from protein: " + this.caloriesFromProtein + "cal", "\n", "weight of carbohydrates: " + this.carbInG + "g", "\n", "calories from carbohydrates: " + this.caloriesFromCarb + "cal", "\n", "weight of fat: " + this.fatInG + "g", "\n", "calories from fat: " + this.caloriesFromFat + "cal");
    }
  }
 
 
 
hamArray = ["ham",100,226,21,0.4,15]
carrotArray = ["carrot",100,41,0.9,9.6,0.2]
riceArray = ["rice",100,130,2.7,28,0.3]
peaArray = ["pea",100,81,5.4,15,0.4]
bananaArray = ["banana",100,89,1.1,22,8,0.3]
 
//Name,exampleG,ExampleCal,proInG,carInG,fatInG,fiberInG,sodiumInMg,ironInMg,calciumInMg,vitaminCInµg,vitaminDInµg
 
ingredientDataBase = {
    banana:["banana",100,89,1.1,22,8,0.3,2.6,1,0.3,5,8700,0],
    pea:["pea",100,81,5.4,15,0.4,5.7,5,1.5,25,4000,0],
    rice:["rice",100,130,2.7,28.2,0.3,0.4,1,1.2,10,0,0],
    carrot:["carrot",100,41,0.9,9.6,0.2,2.8,69,0.3,33,5900,0],
    ham:["ham",100,226,21,0.4,15,0,941,1.4,8,1400,0],
    vegetableOil: ["vegetable oil",100,886,0,0,100,0,0,0.2,0,0,0],
    soySauce: ["soy sauce",100,53,8.1,4.9,0.6,0.8,5493,1.5,33,0,0],
    egg: ["egg",100,143,12.6,0.7,9.5,0,142,1.8,56,0,2],
    whiteOnion: ["white onion",100,40,1.1,9.3,0.1,1.7,4,0.2,23,7400,0],
    butter: ["butter",100,717,0.9,0.1,81.1,0,11,0,24,0,0],
    garlic: ["garlic",100,149,6.4,33,0.5,2.1,17,1.7,181,3120,0],
    greenOnion: ["green onion",100,40,0,8,0,4,40,1.4,80,1920,0],
    oysterSauce: ["oyster sauce",100,127,5.5,7.8,8.1,0.2,242,3.6,79,3.3,0.6],
    sesameOil: ["sesame oil",100,884,0,0,100,0,0,0,0,0,0]
}
 
//ingredientDataBase = {
//    banana:["banana",100,89,1.1,22,8,0.3,2.6,1,0.3,5,8700,0],
//    pea:["pea",100,81,5.4,14.5,0.4,5.7,5,1.5,25,4000,0],
 //   rice:["rice",100,130,2.7,28,0.3,0.4,1,1.2,10,0,0],
   // carrot:["carrot",100,41,0.9,9.6,0.2,2.8,69,0.3,33,5900,0],
 //   ham:["ham",100,226,21,0.4,15,0,941,1.4,8,1400,0],
 //   vegetableOil: ["vegetable oil",100,886,0,0,100,0,0,0.2,0,0,0],
 //   soySauce: ["soy sauce",100,53,8.1,4.9,0.6,0.8,5493,1.5,33,0,0],
 //   egg: ["egg",100,143,13,0.7,9.5,0,142,1.8,56,0,2],
 //   whiteOnion: ["white onion",100,40,1.1,9.3,0.1,1.7,4,0.2,23,7400,0],
 //   butter: ["butter",100,717,0.09,0.1,81,0,643,0,24,0,0],
 //   garlic: ["garlic",100,149,6.4,33,0.5,2.1,17,1.7,181,3120,0],
   // greenOnion: ["green onion",100,40,0,8,0,4,40,1.4,80,1920,0],
 //   oysterSauce: ["oyster sauce",100,51,1.4,11.0,4,0.3,2733,0.2,32,0.1,0],
   // sesameOil: ["sesame oil",100,884,0,0,1000,0,0,0,0,0,0]
//}
 
printAllArray = ["name","weight","calories","proteinInG","caloriesFromProtein","carbInG","caloriesFromCarb","fatInG","caloriesFromFat","fiberInG","caloriesFromFiber","sodiumWeight","ironWeight","calciumWeight","vitaminCWeight","vitaminDWeight","ingredients"]
 
ingredientsArray2 = [new Ingredient(new NutritionData(ingredientDataBase.butter),42),new Ingredient(new NutritionData(ingredientDataBase.egg),88),new Ingredient(new NutritionData(ingredientDataBase.carrot),120),new Ingredient(new NutritionData(ingredientDataBase.whiteOnion),125),new Ingredient(new NutritionData(ingredientDataBase.pea),70),new Ingredient(new NutritionData(ingredientDataBase.garlic),18),new Ingredient(new NutritionData (ingredientDataBase.rice),744),new Ingredient(new NutritionData(ingredientDataBase.greenOnion),36),new Ingredient(new NutritionData (ingredientDataBase.soySauce),56),new Ingredient(new NutritionData(ingredientDataBase.oysterSauce),12),new Ingredient(new NutritionData(ingredientDataBase.sesameOil),2.25)]
 
//ingredientsArray2 = [new Ingredient(new NutritionData(ingredientDataBase.butter),8.4),new Ingredient(new NutritionData(ingredientDataBase.egg),17.6),new Ingredient(new NutritionData(ingredientDataBase.carrot),24),new Ingredient(new NutritionData(ingredientDataBase.whiteOnion),25),new Ingredient(new NutritionData(ingredientDataBase.pea),14),new Ingredient(new NutritionData(ingredientDataBase.garlic),3.6),new Ingredient(new NutritionData (ingredientDataBase.rice),148.8),new Ingredient(new NutritionData(ingredientDataBase.greenOnion),7.2),new Ingredient(new NutritionData (ingredientDataBase.soySauce),12.8),new Ingredient(new NutritionData(ingredientDataBase.oysterSauce),2.4),new Ingredient(new NutritionData(ingredientDataBase.sesameOil),0.45)]
 
 
 
testFriedRice = new DishData("fried rice",ingredientsArray2,5)
 
testFriedRice2 = new PrettyPrinting(testFriedRice)
 
testFriedRice2.print(printAllArray)
testFriedRice = new DishData("fried rice",ingredientsArray2)
 
testFriedRice2 = new PrettyPrinting(testFriedRice)
 
testFriedRice2.print(printAllArray)
 
name: fried rice
VM158:225 ingredients of the dish: butter:42g,egg:88g,carrot:120g,white onion:125g,pea:70g,garlic:18g,rice:744g,green onion:36g,soy sauce:56g,oyster sauce:12g,sesame oil:2.25g
VM158:225 weight: 262.65g
VM158:225 calories: 331.2220000000001cal
VM158:225 weight of protein: 8.8274g
VM158:225 calories from protein: 35.3096cal
VM158:225 weight of carbohydrates: 51.322199999999995g
VM158:225 calories from carbohydrates: 205.28879999999998cal
VM158:225 weight of fat: 9.7894g
VM158:225 calories from fat: 88.1046cal
VM158:225 weight of fiber: 2.9482g
VM158:225 calories from fiber: 29.482cal
VM158:225 weight of sodium: 670.1800000000001mg
VM158:225 weight of iron: 2.8508000000000004mg
VM158:225 weight of calcium: 61.790000000000006mg
VM158:225 weight of vitamin C: 4.0766392mg
VM158:225 weight of vitamin D: 0.3664µg

Im confidence to my result because I tried console.log the ingredients one by one and added the nutritional value.

console.log(ingredientsArray2)
VM370:1 
(11) [Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient, Ingredient]
0: Ingredient
calciumInMg: 2.016
calories: 60.228
caloriesFromCarb: 0.033600000000000005
caloriesFromFat: 61.3116
caloriesFromFiber: 0
caloriesFromProtein: 0.3024
carbInG: 0.008400000000000001
fatInG: 6.8124
fiberInG: 0
ironInMg: 0
name: "butter"
proteinInG: 0.0756
sodiumInMg: 0.924
totalAmount: 8.4
vitaminCInµg: 0
vitaminDInµg: 0
weight: 8.4
[[Prototype]]: Object
1: Ingredient
calciumInMg: 9.856000000000002
calories: 25.168
caloriesFromCarb: 0.4928
caloriesFromFat: 15.048000000000002
caloriesFromFiber: 0
caloriesFromProtein: 8.8704
carbInG: 0.1232
fatInG: 1.6720000000000002
fiberInG: 0
ironInMg: 0.3168
name: "egg"
proteinInG: 2.2176
sodiumInMg: 24.992
totalAmount: 17.6
vitaminCInµg: 0
vitaminDInµg: 0.35200000000000004
weight: 17.6
[[Prototype]]: Object
2: Ingredient
calciumInMg: 7.92
calories: 9.84
caloriesFromCarb: 9.216
caloriesFromFat: 0.432
caloriesFromFiber: 1.3439999999999999
caloriesFromProtein: 0.864
carbInG: 2.304
fatInG: 0.048
fiberInG: 0.6719999999999999
ironInMg: 0.072
name: "carrot"
proteinInG: 0.216
sodiumInMg: 16.56
totalAmount: 24
vitaminCInµg: 1416
vitaminDInµg: 0
weight: 24
[[Prototype]]: Object
3: Ingredient
calciumInMg: 5.75
calories: 10
caloriesFromCarb: 9.3
caloriesFromFat: 0.225
caloriesFromFiber: 0.85
caloriesFromProtein: 1.1
carbInG: 2.325
fatInG: 0.025
fiberInG: 0.425
ironInMg: 0.05
name: "white onion"
proteinInG: 0.275
sodiumInMg: 1
totalAmount: 25
vitaminCInµg: 1850
vitaminDInµg: 0
weight: 25
[[Prototype]]: Object
4: Ingredient
calciumInMg: 3.5000000000000004
calories: 11.34
caloriesFromCarb: 8.4
caloriesFromFat: 0.5040000000000001
caloriesFromFiber: 1.5960000000000003
caloriesFromProtein: 3.0240000000000005
carbInG: 2.1
fatInG: 0.05600000000000001
fiberInG: 0.7980000000000002
ironInMg: 0.21000000000000002
name: "pea"
proteinInG: 0.7560000000000001
sodiumInMg: 0.7000000000000001
totalAmount: 14
vitaminCInµg: 560
vitaminDInµg: 0
weight: 14
[[Prototype]]: Object
5: Ingredient
calciumInMg: 6.516000000000001
calories: 5.364
caloriesFromCarb: 4.752000000000001
caloriesFromFat: 0.16200000000000003
caloriesFromFiber: 0.15120000000000003
caloriesFromProtein: 0.9216000000000002
carbInG: 1.1880000000000002
fatInG: 0.018000000000000002
fiberInG: 0.07560000000000001
ironInMg: 0.061200000000000004
name: "garlic"
proteinInG: 0.23040000000000005
sodiumInMg: 0.6120000000000001
totalAmount: 3.6
vitaminCInµg: 112.32000000000001
vitaminDInµg: 0
weight: 3.6
[[Prototype]]: Object
6: Ingredient
calciumInMg: 14.880000000000003
calories: 193.44000000000003
caloriesFromCarb: 167.84640000000002
caloriesFromFat: 4.017600000000001
caloriesFromFiber: 1.1904000000000001
caloriesFromProtein: 16.070400000000003
carbInG: 41.961600000000004
fatInG: 0.4464000000000001
fiberInG: 0.5952000000000001
ironInMg: 1.7856000000000003
name: "rice"
proteinInG: 4.017600000000001
sodiumInMg: 1.4880000000000002
totalAmount: 148.8
vitaminCInµg: 0
vitaminDInµg: 0
weight: 148.8
[[Prototype]]: Object
7: Ingredient
calciumInMg: 5.760000000000001
calories: 2.8800000000000003
caloriesFromCarb: 2.3040000000000003
caloriesFromFat: 0
caloriesFromFiber: 0.5760000000000001
caloriesFromProtein: 0
carbInG: 0.5760000000000001
fatInG: 0
fiberInG: 0.28800000000000003
ironInMg: 0.1008
name: "green onion"
proteinInG: 0
sodiumInMg: 2.8800000000000003
totalAmount: 7.2
vitaminCInµg: 138.24
vitaminDInµg: 0
weight: 7.2
[[Prototype]]: Object
8: Ingredient
calciumInMg: 3.6959999999999997
calories: 5.936
caloriesFromCarb: 2.1952
caloriesFromFat: 0.6048
caloriesFromFiber: 0.1792
caloriesFromProtein: 3.6287999999999996
carbInG: 0.5488
fatInG: 0.0672
fiberInG: 0.0896
ironInMg: 0.16799999999999998
name: "soy sauce"
proteinInG: 0.9071999999999999
sodiumInMg: 615.2159999999999
totalAmount: 11.2
vitaminCInµg: 0
vitaminDInµg: 0
weight: 11.2
[[Prototype]]: Object
9: Ingredient
calciumInMg: 1.8960000000000001
calories: 3.048
caloriesFromCarb: 0.7488
caloriesFromFat: 1.7495999999999998
caloriesFromFiber: 0.009600000000000001
caloriesFromProtein: 0.528
carbInG: 0.1872
fatInG: 0.1944
fiberInG: 0.0048000000000000004
ironInMg: 0.0864
name: "oyster sauce"
proteinInG: 0.132
sodiumInMg: 5.808
totalAmount: 2.4
vitaminCInµg: 0.07919999999999999
vitaminDInµg: 0.0144
weight: 2.4
[[Prototype]]: Object
10: Ingredient
calciumInMg: 0
calories: 3.978
caloriesFromCarb: 0
caloriesFromFat: 4.050000000000001
caloriesFromFiber: 0
caloriesFromProtein: 0
carbInG: 0
fatInG: 0.45000000000000007
fiberInG: 0
ironInMg: 0
name: "sesame oil"
proteinInG: 0
sodiumInMg: 0
totalAmount: 0.45
vitaminCInµg: 0
vitaminDInµg: 0
weight: 0.45
  • yiler-huang-nutrition-calculator.txt
  • Last modified: 2022/06/22 22:39
  • by yiler.huang