Skip to content

wei-b0/getipify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

getipify

Get your public IP addresses. Uses Ipify service.

Install

npm install getipify

Usage

Import the functions ipv4() and ipv6()

import { ipv4, ipv6 } from "getipify"

Getting the public IP addresses.

    console.log(await ipv4())
    console.log(await ipv6())

OR

    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!

About

Get your public IP addresses

Resources

Stars

Watchers

Forks

Packages

No packages published