diff options
author | Joris | 2021-05-29 19:24:41 +0200 |
---|---|---|
committer | Joris | 2021-05-29 19:24:41 +0200 |
commit | d48cafebb277e4ad4b31e883cbe4f55eef9ea4a4 (patch) | |
tree | 7f04fb49defa5fbc7984b0eee60bb7ce16a37ae2 /src/Food.purs | |
parent | 4e3cd92a8063a70dab9ae0ccafd0552c78c6e005 (diff) |
Rewrite in TypeScript
Diffstat (limited to 'src/Food.purs')
-rw-r--r-- | src/Food.purs | 245 |
1 files changed, 0 insertions, 245 deletions
diff --git a/src/Food.purs b/src/Food.purs deleted file mode 100644 index fb66c9d..0000000 --- a/src/Food.purs +++ /dev/null @@ -1,245 +0,0 @@ -module Food - ( Aliment - , all - , glycemicLoad - ) where - -import Data.Int (toNumber) -import Prelude - -type Aliment = - { name :: String - , glycemicIndex :: Int - , carbohydrates :: Int -- for 100 grams - } - -glycemicLoad :: Aliment -> Number -glycemicLoad aliment = toNumber aliment.glycemicIndex * toNumber aliment.carbohydrates / 100.0 - -all :: Array Aliment -all = - [ { name: "Abricot", glycemicIndex: 30, carbohydrates: 10 } - , { name: "Abricot séché", glycemicIndex: 35, carbohydrates: 44 } - , { name: "Ail", glycemicIndex: 30, carbohydrates: 25 } - , { name: "Amande", glycemicIndex: 15, carbohydrates: 17 } - , { name: "Amande en poudre", glycemicIndex: 20, carbohydrates: 17 } - , { name: "Ananas", glycemicIndex: 45, carbohydrates: 12 } - , { name: "Artichaut", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Asperge", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Aubergine", glycemicIndex: 20, carbohydrates: 3 } - , { name: "Avocat", glycemicIndex: 10, carbohydrates: 4 } - - , { name: "Bambou pousses", glycemicIndex: 20, carbohydrates: 6 } - , { name: "Banane", glycemicIndex: 60, carbohydrates: 22 } - , { name: "Betterave crue", glycemicIndex: 30, carbohydrates: 9 } - , { name: "Betterave cuite", glycemicIndex: 65, carbohydrates: 7 } - , { name: "Boulghour", glycemicIndex: 55, carbohydrates: 20 } - , { name: "Brocoli", glycemicIndex: 15, carbohydrates: 5 } - , { name: "Brugnon", glycemicIndex: 35, carbohydrates: 14 } - - , { name: "Cacahuète", glycemicIndex: 15, carbohydrates: 11 } - , { name: "Cacao en poudre", glycemicIndex: 20, carbohydrates: 25 } - , { name: "Canneloni", glycemicIndex: 55, carbohydrates: 10 } - , { name: "Carotte crue", glycemicIndex: 20, carbohydrates: 5 } - , { name: "Carotte cuite", glycemicIndex: 35, carbohydrates: 5 } - , { name: "Céleri branche", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Céleri-rave", glycemicIndex: 35, carbohydrates: 3 } - , { name: "Céleri-rave rapé", glycemicIndex: 20, carbohydrates: 6 } - , { name: "Cêpes", glycemicIndex: 15, carbohydrates: 4 } - , { name: "Cerise", glycemicIndex: 25, carbohydrates: 16 } - , { name: "Cerneaux de noix", glycemicIndex: 15, carbohydrates: 11 } - , { name: "Champignon", glycemicIndex: 0, carbohydrates: 1 } - , { name: "Chataigne grillée", glycemicIndex: 60, carbohydrates: 42 } - , { name: "Croissant", glycemicIndex: 60, carbohydrates: 57 } - - , { name: "Chocolat noir 70%", glycemicIndex: 25, carbohydrates: 32 } - , { name: "Chocolat noir 85%", glycemicIndex: 20, carbohydrates: 24 } - , { name: "Choux blanc", glycemicIndex: 15, carbohydrates: 4 } - , { name: "Choux chinois", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Choux de bruxelles", glycemicIndex: 15, carbohydrates: 3 } - , { name: "Choux fleur", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Choux romanesco", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Choux rouge", glycemicIndex: 15, carbohydrates: 7 } - , { name: "Choux vert", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Citron", glycemicIndex: 20, carbohydrates: 3 } - , { name: "Citron vert", glycemicIndex: 20, carbohydrates: 7 } - , { name: "Citrouille", glycemicIndex: 80, carbohydrates: 6 } - , { name: "Clémentine", glycemicIndex: 30, carbohydrates: 9 } - , { name: "Coeur de palmier", glycemicIndex: 20, carbohydrates: 11 } - , { name: "Coing", glycemicIndex: 35, carbohydrates: 14 } - , { name: "Compote de pomme", glycemicIndex: 35, carbohydrates: 18 } - , { name: "Concombre", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Confiture de fruit", glycemicIndex: 65, carbohydrates: 60 } - , { name: "Cornichon", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Coulis de tomate", glycemicIndex: 30, carbohydrates: 5 } - , { name: "Courgette", glycemicIndex: 15, carbohydrates: 3 } - , { name: "Cresson", glycemicIndex: 15, carbohydrates: 2 } - - , { name: "Dattes", glycemicIndex: 70, carbohydrates: 73 } - - , { name: "Echalote", glycemicIndex: 15, carbohydrates: 7 } - , { name: "Endive", glycemicIndex: 15, carbohydrates: 4 } - , { name: "Épinard", glycemicIndex: 15, carbohydrates: 3 } - - , { name: "Faisselle 0%", glycemicIndex: 30, carbohydrates: 4 } - , { name: "Faisselle 40%", glycemicIndex: 30, carbohydrates: 3 } - , { name: "Farine de blé", glycemicIndex: 85, carbohydrates: 71 } - , { name: "Farine de blé à levure incorporée", glycemicIndex: 85, carbohydrates: 71 } - , { name: "Farine de blé complète T130", glycemicIndex: 45, carbohydrates: 64 } - , { name: "Farine de blé intégrale T150", glycemicIndex: 45, carbohydrates: 64 } - , { name: "Farine de maïs", glycemicIndex: 85, carbohydrates: 85 } - , { name: "Farine de quinoa", glycemicIndex: 40, carbohydrates: 64 } - , { name: "Farine de riz", glycemicIndex: 95, carbohydrates: 85 } - , { name: "Farine de seigle complète T130", glycemicIndex: 45, carbohydrates: 59 } - , { name: "Farine de seigle intégrale T150", glycemicIndex: 45, carbohydrates: 59 } - , { name: "Fécule de maïs", glycemicIndex: 85, carbohydrates: 88 } - , { name: "Fenouil", glycemicIndex: 15, carbohydrates: 5 } - , { name: "Fève", glycemicIndex: 15, carbohydrates: 14 } - , { name: "Figue Blanche", glycemicIndex: 20, carbohydrates: 19 } - , { name: "Figue noir", glycemicIndex: 35, carbohydrates: 13 } - , { name: "Flageolet", glycemicIndex: 25, carbohydrates: 12 } - , { name: "Flocons d'avoine", glycemicIndex: 40, carbohydrates: 62 } - , { name: "Fraise", glycemicIndex: 25, carbohydrates: 7 } - , { name: "Framboise", glycemicIndex: 25, carbohydrates: 8 } - , { name: "Frites maison", glycemicIndex: 95, carbohydrates: 52 } - , { name: "Fromage blanc", glycemicIndex: 30, carbohydrates: 4 } - , { name: "Fruits rouges", glycemicIndex: 15, carbohydrates: 6 } - - , { name: "Galette de blé noir", glycemicIndex: 40, carbohydrates: 31 } - , { name: "Gnocchi", glycemicIndex: 68, carbohydrates: 32 } - , { name: "Grenade", glycemicIndex: 35, carbohydrates: 13 } - , { name: "Groseilles", glycemicIndex: 25, carbohydrates: 10 } - , { name: "Groseilles à maquereau", glycemicIndex: 25, carbohydrates: 6 } - - , { name: "Haricot beurre", glycemicIndex: 15, carbohydrates: 3 } - , { name: "Haricot blanc", glycemicIndex: 35, carbohydrates: 14 } - , { name: "Haricot mange tout", glycemicIndex: 15, carbohydrates: 7 } - , { name: "Haricot noir", glycemicIndex: 35, carbohydrates: 24 } - , { name: "Haricot rouge", glycemicIndex: 35, carbohydrates: 15 } - , { name: "Haricot vert", glycemicIndex: 30, carbohydrates: 3 } - - , { name: "Jus d'abricot", glycemicIndex: 50, carbohydrates: 14 } - , { name: "Jus d'ananas", glycemicIndex: 50, carbohydrates: 12 } - , { name: "Jus d'orange", glycemicIndex: 45, carbohydrates: 11 } - , { name: "Jus de citron", glycemicIndex: 20, carbohydrates: 9 } - , { name: "Jus de framboise", glycemicIndex: 50, carbohydrates: 11 } - , { name: "Jus de pamplemousse rose", glycemicIndex: 45, carbohydrates: 9 } - , { name: "Jus de pomme", glycemicIndex: 50, carbohydrates: 11 } - , { name: "Jus de pruneaux", glycemicIndex: 55, carbohydrates: 19 } - , { name: "Jus de raisin", glycemicIndex: 55, carbohydrates: 15 } - , { name: "Jus de tomate", glycemicIndex: 35, carbohydrates: 4 } - , { name: "Jus multifruits", glycemicIndex: 50, carbohydrates: 12 } - , { name: "Jus peche", glycemicIndex: 50, carbohydrates: 13 } - - , { name: "Kiwi", glycemicIndex: 50, carbohydrates: 11 } - - , { name: "Lait de coco", glycemicIndex: 40, carbohydrates: 3 } - , { name: "lait demi écrémé", glycemicIndex: 30, carbohydrates: 5 } - , { name: "Lait écrémé", glycemicIndex: 30, carbohydrates: 5 } - , { name: "Lait en poudre", glycemicIndex: 30, carbohydrates: 38 } - , { name: "Lait entier", glycemicIndex: 30, carbohydrates: 5 } - , { name: "Lentilles cuites", glycemicIndex: 20, carbohydrates: 16 } - , { name: "Levure chimique sachet", glycemicIndex: 35, carbohydrates: 19 } - , { name: "Litchi", glycemicIndex: 50, carbohydrates: 17 } - - , { name: "Maïs", glycemicIndex: 70, carbohydrates: 19 } - , { name: "Maïzena", glycemicIndex: 70, carbohydrates: 70 } - , { name: "Mandarine", glycemicIndex: 30, carbohydrates: 9 } - , { name: "Mangue", glycemicIndex: 50, carbohydrates: 15 } - , { name: "Mélange noix", glycemicIndex: 15, carbohydrates: 24 } - , { name: "Melon", glycemicIndex: 60, carbohydrates: 8 } - , { name: "Miel", glycemicIndex: 90, carbohydrates: 86 } - , { name: "Muesli Bjorg", glycemicIndex: 20, carbohydrates: 61 } - , { name: "Mulet", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Mûre", glycemicIndex: 25, carbohydrates: 12 } - , { name: "Myrtilles", glycemicIndex: 25, carbohydrates: 11 } - - , { name: "Navet", glycemicIndex: 70, carbohydrates: 7 } - , { name: "Nectar d'abricot", glycemicIndex: 50, carbohydrates: 13 } - , { name: "Nectar de banane", glycemicIndex: 50, carbohydrates: 10 } - , { name: "Nectar de goyave", glycemicIndex: 50, carbohydrates: 10 } - , { name: "Nectar de mangue", glycemicIndex: 50, carbohydrates: 12 } - , { name: "Nectarine", glycemicIndex: 35, carbohydrates: 13 } - - , { name: "Noisette", glycemicIndex: 25, carbohydrates: 17 } - , { name: "Noix de cajou", glycemicIndex: 15, carbohydrates: 21 } - , { name: "Noix de coco", glycemicIndex: 35, carbohydrates: 10 } - , { name: "Noix de coco râpée", glycemicIndex: 35, carbohydrates: 12 } - , { name: "Noix de macadamia", glycemicIndex: 15, carbohydrates: 13 } - , { name: "Noix de pecan", glycemicIndex: 15, carbohydrates: 14 } - - , { name: "Olive verte", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Olives noires", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Orange", glycemicIndex: 30, carbohydrates: 9 } - - , { name: "Pain", glycemicIndex: 70, carbohydrates: 56 } - , { name: "Pain à Hamburger", glycemicIndex: 85, carbohydrates: 50 } - , { name: "Pain au seigle", glycemicIndex: 65, carbohydrates: 50 } - , { name: "pain aux céréales", glycemicIndex: 65, carbohydrates: 55 } - , { name: "Pain aux raisins", glycemicIndex: 70, carbohydrates: 46 } - , { name: "Pain au chocolat", glycemicIndex: 65, carbohydrates: 49 } - , { name: "Pain complet", glycemicIndex: 65, carbohydrates: 44 } - , { name: "Pain hamburger complet", glycemicIndex: 48, carbohydrates: 48 } - , { name: "Pastèque", glycemicIndex: 75, carbohydrates: 7 } - , { name: "Patate douce", glycemicIndex: 50, carbohydrates: 20 } - , { name: "Pâtes", glycemicIndex: 75, carbohydrates: 35 } - , { name: "Pâtes complètes", glycemicIndex: 45, carbohydrates: 19 } - , { name: "Pâtes (spaghettis al dente)", glycemicIndex: 45, carbohydrates: 25 } - , { name: "Pâte de fruit", glycemicIndex: 70, carbohydrates: 53 } - , { name: "Petit pois", glycemicIndex: 35, carbohydrates: 11 } - , { name: "Physalis", glycemicIndex: 25, carbohydrates: 6 } - , { name: "Pissenlit", glycemicIndex: 15, carbohydrates: 6 } - , { name: "Pistache", glycemicIndex: 15, carbohydrates: 15 } - , { name: "Poire", glycemicIndex: 30, carbohydrates: 14 } - , { name: "Poireau", glycemicIndex: 15, carbohydrates: 3 } - , { name: "Pois cassés", glycemicIndex: 22, carbohydrates: 22 } - , { name: "Pois chiches bouillis", glycemicIndex: 30, carbohydrates: 28 } - , { name: "Pois chiches", glycemicIndex: 30, carbohydrates: 19 } - , { name: "Poivron", glycemicIndex: 15, carbohydrates: 4 } - , { name: "Pomme", glycemicIndex: 35, carbohydrates: 19 } - , { name: "Pommes de terre au four", glycemicIndex: 95, carbohydrates: 23 } - , { name: "Pommes de terre", glycemicIndex: 65, carbohydrates: 19 } - , { name: "Potimarron", glycemicIndex: 80, carbohydrates: 6 } - , { name: "Potiron", glycemicIndex: 80, carbohydrates: 5 } - , { name: "Pulpe Tomate", glycemicIndex: 30, carbohydrates: 4 } - - , { name: "Raisin", glycemicIndex: 40, carbohydrates: 16 } - , { name: "Raisin sec", glycemicIndex: 65, carbohydrates: 75 } - , { name: "Rhubarbe", glycemicIndex: 15, carbohydrates: 3 } - , { name: "Riz complet cuit à la vapeur", glycemicIndex: 50, carbohydrates: 24 } - , { name: "Riz complet cuit dans un excès d'eau pendant 25 minutes", glycemicIndex: 72, carbohydrates: 24 } - , { name: "Riz blanc", glycemicIndex: 83, carbohydrates: 29 } - , { name: "Riz basmati blanc", glycemicIndex: 58, carbohydrates: 26 } - , { name: "Riz basmati complet", glycemicIndex: 45, carbohydrates: 21 } - , { name: "Riz inca (Quinoa)", glycemicIndex: 53, carbohydrates: 21 } - , { name: "Riz sauvage", glycemicIndex: 57, carbohydrates: 29 } - - , { name: "Salade", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Salade feuille de chêne", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Salade frisée", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Salade laitue", glycemicIndex: 15, carbohydrates: 2 } - , { name: "Salade mache", glycemicIndex: 15, carbohydrates: 1 } - , { name: "Salade mesclun", glycemicIndex: 15, carbohydrates: 2 } - , { name: "salade roquette", glycemicIndex: 15, carbohydrates: 4 } - , { name: "Salsifis", glycemicIndex: 30, carbohydrates: 14 } - , { name: "Sauge (feuille)", glycemicIndex: 40, carbohydrates: 60 } - , { name: "Semoule", glycemicIndex: 68, carbohydrates: 24 } - , { name: "Sirop d'érable", glycemicIndex: 65, carbohydrates: 65 } - , { name: "Son d'avoine", glycemicIndex: 15, carbohydrates: 51 } - - , { name: "Tomate", glycemicIndex: 30, carbohydrates: 4 } - , { name: "Tomate cerise", glycemicIndex: 30, carbohydrates: 4 } - , { name: "Tomate grappe", glycemicIndex: 30, carbohydrates: 3 } - , { name: "Tomate sechée", glycemicIndex: 35, carbohydrates: 8 } - , { name: "Tomme de chèvre", glycemicIndex: 10, carbohydrates: 3 } - , { name: "Topinambour", glycemicIndex: 15, carbohydrates: 14 } - , { name: "Tranche pain de mie", glycemicIndex: 85, carbohydrates: 46 } - - , { name: "Yaourt", glycemicIndex: 35, carbohydrates: 5 } - , { name: "Yaourt brassé nature", glycemicIndex: 35, carbohydrates: 6 } - , { name: "Yaourt lait de brebis", glycemicIndex: 35, carbohydrates: 4 } - , { name: "Yaourt lait entier", glycemicIndex: 35, carbohydrates: 5 } - , { name: "Yaourt nature", glycemicIndex: 35, carbohydrates: 5 } - - , { name: "Zeste citron", glycemicIndex: 20, carbohydrates: 13 } - ] |