https://github.com/weibozzz/real-ip
一个获取用户访问的真实ip
https://github.com/weibozzz/real-ip
Last synced: about 2 months ago
JSON representation
一个获取用户访问的真实ip
- Host: GitHub
- URL: https://github.com/weibozzz/real-ip
- Owner: Weibozzz
- Created: 2018-07-28T06:35:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-28T15:54:10.000Z (almost 7 years ago)
- Last Synced: 2025-01-28T02:42:12.223Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## real-ip
一个可以获取到用户真实ip地址的包
## install
```bash
npm install real-ip```
## usage
import {getIPs} from 'real-ip'
注意:需要在dom加载完的时候使用,否则会找不到window
```js
getIPs(ip=>{
console.log('真实ip地址',ip)
})
```