aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridon <[email protected]>2022-06-23 09:38:58 +0400
committerFridon <[email protected]>2022-06-23 09:38:58 +0400
commit660b0439ba9f95f454d73e17575912c021c1efda (patch)
tree2ea26e8442f8e08419308b99c7cee74a7edb42e5
parentd1950145c013af874b8cb9faeacd49d2b7c633b5 (diff)
downloadcountryfetch-660b0439ba9f95f454d73e17575912c021c1efda.tar.xz
countryfetch-660b0439ba9f95f454d73e17575912c021c1efda.zip
change population type to string in FetchedCountries
-rw-r--r--src/countries.ts2
-rw-r--r--src/models/FetchedCountry.model.ts2
-rw-r--r--src/util/logger.ts2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/countries.ts b/src/countries.ts
index bf8ae84..432fcd1 100644
--- a/src/countries.ts
+++ b/src/countries.ts
@@ -93,7 +93,7 @@ export class Countries {
country: country.name.common,
capital: country.capital[0],
flag: country.flag,
- population: country.population,
+ population: country.population.toLocaleString(),
region: country.region,
currencies,
languages,
diff --git a/src/models/FetchedCountry.model.ts b/src/models/FetchedCountry.model.ts
index be636ff..0dd783d 100644
--- a/src/models/FetchedCountry.model.ts
+++ b/src/models/FetchedCountry.model.ts
@@ -4,6 +4,6 @@ export interface FetchedCountry {
languages: string;
capital: string;
region: string;
- population: number;
+ population: string;
currencies: string;
}
diff --git a/src/util/logger.ts b/src/util/logger.ts
index 52965c8..2e9045a 100644
--- a/src/util/logger.ts
+++ b/src/util/logger.ts
@@ -30,7 +30,7 @@ export class Logger {
nano.green("\nRegion:\t\t"),
country.region,
nano.green("\nPopulation:\t"),
- country.population.toLocaleString(),
+ country.population,
nano.green("\nCurrencies:\t"),
country.currencies
);