mapper.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. function translationTable(obj) {
  2. return `<table border="1">
  3. <tr><th> Translations </th></tr>
  4. <tr><td> fa: ${obj.fa} </td></tr>
  5. <tr><td> hr: ${obj.hr} </td></tr>
  6. <tr><td> nl: ${obj.nl} </td></tr>
  7. <tr><td> pt: ${obj.pt} </td></tr>
  8. <tr><td> br: ${obj.br} </td></tr>
  9. <tr><td> it: ${obj.it} </td></tr>
  10. <tr><td> ja: ${obj.ja} </td></tr>
  11. <tr><td> fr: ${obj.fr} </td></tr>
  12. <tr><td> es: ${obj.es} </td></tr>
  13. <tr><td> de: ${obj.de} </td></tr>
  14. <table>`;
  15. }
  16. function basicsTable(obj) {
  17. return `<table border="1">
  18. <tr>
  19. <th>cioc</th>
  20. <th>flag</th>
  21. <th>numericCode</th>
  22. <th>nativeName</th>
  23. <th>gini</th>
  24. <th>area</th>
  25. <th>demonym</th>
  26. <th>population</th>
  27. <th>subregion</th>
  28. <th>region</th>
  29. <th>capital</th>
  30. <th>alpha3Code</th>
  31. <th>alpha2Code</th>
  32. </tr>
  33. <tr>
  34. <td>${obj.cioc}</td>
  35. <td>${obj.flag}</td>
  36. <td>${obj.numericCode}</td>
  37. <td>${obj.nativeName}</td>
  38. <td>${obj.gini}</td>
  39. <td>${obj.area}</td>
  40. <td>${obj.demonym}</td>
  41. <td>${obj.population}</td>
  42. <td>${obj.subregion}</td>
  43. <td>${obj.region}</td>
  44. <td>${obj.capital}</td>
  45. <td>${obj.alpha3Code}</td>
  46. <td>${obj.alpha2Code}</td>
  47. </tr>
  48. <table>`;
  49. }
  50. function tableTHTranslations(th) {
  51. return `<table border="1"><tr>${th}</tr>`;
  52. }
  53. function tableTH(th) {
  54. return `<table border="1"><tr>${th}</tr>`;
  55. }
  56. function tableTD(td) {
  57. return `<tr>${td}</tr></table>`;
  58. }