dy-node-ip2region
Version:
official nodejs client of ip2region
32 lines (21 loc) • 458 B
Markdown
# nodejs 客户端
度言官方维护的 ip2region, 每次数据更新后会更新到 npm
## Install
**node 版本 : >= 6.0.0**
```
npm install dy-node-ip2region --save
```
## 已测试通过的 node 版本列表
```
6.0.0
6.11.2
8.0.0
10.0.0
12.0.0
```
## Example
```
const searcher = require('dy-node-ip2region').create();
searcher.btreeSearchSync('xxx.xxx.xxx.xxx')
// => { city: 2163, region: '中国|亚洲|广东省|深圳市|联通' }
```