https://github.com/isekaimaou1109/get-client-ip-address
This package will get an ip address when you access by browser or to server
https://github.com/isekaimaou1109/get-client-ip-address
Last synced: 2 months ago
JSON representation
This package will get an ip address when you access by browser or to server
- Host: GitHub
- URL: https://github.com/isekaimaou1109/get-client-ip-address
- Owner: isekaimaou1109
- Created: 2023-01-14T15:54:19.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-14T16:09:42.000Z (over 2 years ago)
- Last Synced: 2025-02-28T10:02:34.712Z (3 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## **THIS PACKAGE IS NOT USED FOR COMMERCIAL PURPOSE** ##
***
### **__Usage:__** ###
- `Case 1:` When using in `CommonJS (Node environment)`
```javascript
(async function () {
return await (await import('get-real-client-ip')).getClientInformation();
})();
```- `Case 2:` When using in `ESM`
```javascript
import { getClientInformation } from 'get-real-client-ip'getClientInformation()
.then(ip => console.log(ip))
.catch(e => console.error(e))
```### **__Result:__** ###
```json
{
"ip": "x.x.x.x",
"registry": "",
"countrycode": "DE",
"countryname": "Germany",
"asn": {
"code": "X",
"name": "",
"route": "X.X.X.X/24",
"start": "X.X.X.X",
"end": "X.X.X.X",
"count": "X"
},
"spam": false,
"tor": false
}
```### **Hope all of you guys like this small package, please give a star. Thank you. :heart::heart:** ###