Skip to content

Commit

Permalink
can send all data of cities and provinces
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammad-hassani committed Jul 6, 2022
1 parent 5657252 commit 2173dc1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/src/modules/AllCities.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const cities = __importStar(require("../../json/cities.json"));
function AllCities() {
let citiesArray = [];
for (let i = 0; i < Object.keys(cities).length - 1; i++) {
citiesArray.push(cities[i].name);
citiesArray.push(cities[i]);
}
return citiesArray;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/src/modules/AllProvinces.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const provinces = __importStar(require("../../json/provinces.json"));
function AllProvinces() {
let provincesArray = [];
for (let i = 0; i < Object.keys(provinces).length - 1; i++) {
provincesArray.push(provinces[i].name);
provincesArray.push(provinces[i]);
}
return provincesArray;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iran-city",
"version": "1.0.1",
"version": "1.0.2",
"description": "list of cities in iran",
"main": "dist/src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/AllCities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as cities from '../../json/cities.json';
export default function AllCities(): string[] {
let citiesArray:any = [];
for (let i = 0; i < Object.keys(cities).length-1; i++) {
citiesArray.push(cities[i].name);
citiesArray.push(cities[i]);
}
return citiesArray;
}
2 changes: 1 addition & 1 deletion src/modules/AllProvinces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as provinces from '../../json/provinces.json';
export default function AllProvinces(): string[] {
let provincesArray:any = [];
for (let i = 0; i < Object.keys(provinces).length-1; i++) {
provincesArray.push(provinces[i].name);
provincesArray.push(provinces[i]);
}
return provincesArray;
}

0 comments on commit 2173dc1

Please sign in to comment.