New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ip-locale

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-locale

Locate the country with ip without using the network. The heaviest task took 0.01 ~ 0.05 seconds

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

Ip-locale v1.0.3

Locate the country with ip without using the network.

This package Find matches in a total of 187,356 IP bands

The heaviest task took 0.01 ~ 0.05 seconds

Contains 22MB of national IP data. However, if you only have the country code, you can reduce it to 8 MB.

Consequently you want smaller capacity, you should use ip finder which uses network

Install

Using npm:

    npm i ip-locale --save

In Node.js:

    const ipLocale = require('ip-locale');    
    const ipInfo1 = ipLocale('14.128.128.2');
    const ipInfo2 = ipLocale('123.123.123.123');
    

Result:

14.128.128.2

  { 
      countryCode: 'KR',
      currencyCode: 'KRW',
      regionName: 'Seoul',
      countryName: 'South Korea',
      isoCode: 'KOR',
      phoneCode: '82' 
  }

123.123.123.123

    {
        countryCode: 'PH',
        currencyCode: 'PHP',
        regionName: 'Manila',
        countryName: 'Philippines',
        isoCode: 'PHL',
        phoneCode: '63' 
    }

Keywords

ip finder

FAQs

Package last updated on 05 Jul 2018

Did you know?

Socket

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