Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)!