Socket
Socket
Sign inDemoInstall

pmj-data

Package Overview
Dependencies
22
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.2 to 1.1.4

1

dist/index.d.ts

@@ -63,2 +63,3 @@ interface Response {

export declare function GetCityDetails(city: string): cities[];
export declare function GetTopAirportsInCountry(country_code: string, max: number): Response[];
export {};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetCityDetails = exports.GetAirportNearbyCity = exports.GetCountryDetails = exports.AirlineDetails = exports.SearchAirports = exports.GetAirportDetails = void 0;
exports.GetTopAirportsInCountry = exports.GetCityDetails = exports.GetAirportNearbyCity = exports.GetCountryDetails = exports.AirlineDetails = exports.SearchAirports = exports.GetAirportDetails = void 0;
const airlines_1 = require("./data/airlines");

@@ -124,1 +124,18 @@ const airports_1 = require("./data/airports");

exports.GetCityDetails = GetCityDetails;
function GetTopAirportsInCountry(country_code, max) {
let data = [];
const findData = airports_1.AIRPORTS.data.insert_airports.results.filter((i) => {
if (i.country_code.toLowerCase() === country_code.toLowerCase()) {
return i?.top_location_in_country === true;
}
else {
return [];
}
});
data = findData;
if (max) {
return data.slice(0, 10);
}
return data;
}
exports.GetTopAirportsInCountry = GetTopAirportsInCountry;

2

package.json
{
"name": "pmj-data",
"version": "1.1.2",
"version": "1.1.4",
"description": "Search Airports, Cities, Countries and many other data in Plan My Journey DATABASE.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc