Ip-loca v1.0.3
Locate the country with ip without using the network.
The heaviest task took 0.01 ~ 0.05 seconds
This package contains country ip data. size 22MB
Consequently you want smaller capacity, you should use ip finder which uses network
Install
Using npm:
npm i ip-local --save
In Node.js
const ipLocal = require('ip-local');
const ipInfo = ipLocal('123.123.123.123');
Result
{
countryCode: '125.123.123.123',
currencyCode: 'PHP',
regionName: 'Manila',
countryName: 'Philippines',
isoCode: 'PHL',
phoneCode: '63'
}
Warning
It is recommended that you read this package only once.