Socket
Socket
Sign inDemoInstall

ip2airport

Package Overview
Dependencies
37
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ip2airport

IP to nearest airport lookup


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ip2airport - IP to nearest airport lookup

simple module to lookup the nearest airport to a given IP address. Public data from https://ourairports.com/data/.

Example

import IP2Airport from 'ip2airport';

const ip2airport = new IP2Airport();

// 100km radius, 5 nearest airports, in kilometers. For nautical miles use "N" instead of "K".
const nearestAirports = await ip2airport.nearest('50.112.136.166', 100, 5, 'K');

console.log(nearestAirports);

Sample output

[
  {
    country_code: 'US',
    region_name: 'Pasco',
    iata: 'PSC',
    airport: 'Tri Cities Airport',
    ll: [ 46.26470184326172, -119.11900329589844 ],
    distance: 65.16
  }
]

FAQs

Last updated on 19 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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