@terungwa/

chopnownow

Nodejs

No description

fork
loading
Files
  • index.js
  • delivery_locations
  • drinks_price
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var food_type_prices = {
  white_rice: 300,
  jollof_rice: 450,
  mushroom_rice: 800,
  minced_meat_fried_rice: 800,
  fried_rice: 450,
  jollof_and_fried_rice: 500,
  cantonese_fried_rice: 800,
  ofada_rice: 400,
  jambalaya_rice: 800,
  coconut_rice: 600,
  beans_pottage: 350,
  ewa_aganyin_sauce: 500,
  jollof_spaghetti: 450,
  grilled_fried_turkey: 1000,
  assorted_meat_shaki: 400,
  stewed_fried_beef: 400,
  gizzard: 500,
  stewed_fried_goat_meat: 550,
  grilled_fried_titus_fish: 550,
  grilled_fried_croaker_fish: 1000,
  catfish: 900,
  snails: 1000,
  grilled_fried_quater_chicken: 900,
  grilled_fried_one_sixth_chicken: 600,
  boiled_egg: 100,
  ponmo: 250,
  assorted_meat_kidney: 300,
  asun: 1000,
  moi_moi: 300,
  coleslaw: 300,
  fried_plantain: 200,
  boiled_egg: 100,
  cat_fish_pepper_soup: 2000,
  egg_sauce: 350,
  goat_meat_pepper_soup: 1200,
  afang_soup: 450,
  ofada_sauce: 600,
  egusi_soup: 450,
  efo_riro:450,
  mackerel_sauce: 550,
  okro_soup: 400,
  gbegiri_and_ewedu_soup: 150,
  edikaikong_soup: 450,
  turkey_pepper_soup: 1200
};

var price = function price(choice){
  let str = choice;
  str = str.toLowerCase()
  str = str.replace(/[\s-]/gi,"_");
  return food_type_prices[str];
}

console.log(price('Turkey pepper soup'));
node v10.16.0