update nodejs client and use node-ip2region for npm package name

This commit is contained in:
dongyado
2020-02-20 12:58:56 +08:00
parent 03c3ff6264
commit e33004f319
3 changed files with 12 additions and 10 deletions

View File

@@ -1,14 +1,16 @@
# nodejs 客户端
官方维护的 ip2region, 每次数据更新后会更新到 npm
## Install
```
npm install lionsoul-ip2region --save
npm install node-ip2region --save
```
## Example
```
const searcher = require('lionsoul-ip2region').create();
const searcher = require('node-ip2region').create();
searcher.btreeSearchSync('xxx.xxx.xxx.xxx')
// => { city: 2163, region: '中国|0|广东省|深圳市|联通' }
```
@@ -83,4 +85,4 @@ Rand Name Time (in milliseconds)
4 BinarySearchSync 1.639
5 BtreeSearch 3.407
6 BinarySearch 6.497
```
```