pmj-data
Advanced tools
Comparing version 1.2.0 to 1.2.2
@@ -68,3 +68,3 @@ "use strict"; | ||
const findData = airports_1.AIRPORTS.data.insert_airports.results.findIndex((i) => { | ||
return i.city_name ? i.city_name.toLowerCase() === city.toLowerCase() : Object.values(i).join('').toLowerCase().includes(city.toLowerCase()); | ||
return i.city_name ? i.city_name.toLowerCase() === city.toLowerCase() && i?.top_location_in_country === true : Object.values(i).join('').toLowerCase().includes(city.toLowerCase()) && i?.top_location_in_country === true; | ||
}); | ||
@@ -71,0 +71,0 @@ const foundData = airports_1.AIRPORTS.data.insert_airports.results[findData]; |
@@ -126,3 +126,3 @@ import { AIRLINES } from "./data/airlines"; | ||
const findData = AIRPORTS.data.insert_airports.results.findIndex((i)=>{ | ||
return i.city_name ? i.city_name.toLowerCase() === city.toLowerCase() : Object.values(i).join('').toLowerCase().includes(city.toLowerCase()); | ||
return i.city_name ? i.city_name.toLowerCase() === city.toLowerCase() && i?.top_location_in_country === true : Object.values(i).join('').toLowerCase().includes(city.toLowerCase()) && i?.top_location_in_country === true; | ||
}); | ||
@@ -129,0 +129,0 @@ |
{ | ||
"name": "pmj-data", | ||
"version": "1.2.0", | ||
"version": "1.2.2", | ||
"description": "Search Airports, Cities, Countries and many other data in Plan My Journey DATABASE.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
69922980