- the data is from ip2location free database.
- it only supports country code info
how to use
npm install ip2cc
const iptocc = require('iptocc'); const countryCode = iptocc('184.108.40.206'); console.log(countryCode);//HK
how about efficiency
on my mac ,look up 1,000,000 ips only need about 2000ms.
it is faster hundred times than ip2location-nodejs.