Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaibhavmuchandi/getipify
Get your public IP addresses
https://github.com/vaibhavmuchandi/getipify
Last synced: 11 days ago
JSON representation
Get your public IP addresses
- Host: GitHub
- URL: https://github.com/vaibhavmuchandi/getipify
- Owner: vaibhavmuchandi
- Created: 2022-09-12T11:32:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-12T11:58:31.000Z (about 2 years ago)
- Last Synced: 2024-10-29T01:21:23.274Z (19 days ago)
- Language: JavaScript
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# getipify
> Get your public IP addresses. Uses [Ipify](https://www.ipify.org) service.
## Install
```
npm install getipify
```
## Usage
Import the functions `ipv4()` and `ipv6()`
```js
import { ipv4, ipv6 } from "getipify"
```
Getting the public IP addresses.
```js
console.log(await ipv4())
console.log(await ipv6())
```
OR
```js
ipv4()
.then(ipv4 => console.log(ipv4))
.catch(e => console.log(e))
ipv6()
.then(ipv6 => console.log(ipv6))
.catch(e => console.log(e))
```
## Contribute
Feel free to join in. All welcome. Open an [issue](https://github.com/vaibhavmuchandi/ipfs-messenger/issues)!