17monip 中文文档教程
17monip
通过本地 17monip 数据库查找 ip 的国家/地区。 我重构了 ipdata,在此期间整合了同一个国家的 ip。 所以这个模块只支持国家代码信息,速度更快。 如果要更新 ip 数据库,请更新文件“17monipdb.dat”,然后执行 change.js。
how to use
npm install 17monip
const findIp = require('17monip');
let country_code = findIp('5.121.2.3');
console.log(country_code);//IR
how about efficiency
你可以在我的mac上执行index.test.js
,发现1000,000 ips只需要<200ms
17monip
find country of ip by 17monip database local. I restruct the ipdata ,integrate same country ip during. so this module only support country code info, it is more faster. if you want to update the ip database, update the file '17monipdb.dat' and then excute change.js.
how to use
npm install 17monip
const findIp = require('17monip');
let country_code = findIp('5.121.2.3');
console.log(country_code);//IR
how about efficiency
you can excute index.test.js
on my mac,finding 1000,000 ips only need <200ms