【文件属性】:
文件名称:iplocation:获取IP位置信息
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-07 11:30:36
nodejs geolocation ip-address geolocation-api ip
iplocation
获取IP位置信息。
安装
npm install iplocation
用法
const ipLocation = require ( "iplocation" ) ;
( async ( ) => {
await ipLocation ( "172.217.167.78" ) ;
//=> { latitude: -33.8591, longitude: 151.2002, region: { name: "New South Wales" ... } ... }
} ) ( ) ;
原料药
ipLocation(ip)
ip
类型: string
用于获取信息的ipv4地址。
提供者
iplocation当前使用进行IP查找。 他们的免费API每天最多只能处理1000个请求。
有关的
此模块的CLI。
【文件预览】:
iplocation-master
----.travis.yml(46B)
----package.json(1KB)
----test.ts(646B)
----LICENSE(1KB)
----tsconfig.json(111B)
----.npmrc(19B)
----README.md(888B)
----.editorconfig(190B)
----source()
--------index.ts(3KB)