Skip to content

rqt/ip

Repository files navigation

@rqt/ip

npm version

@rqt/ip Returns a public IP address of the host.

yarn add @rqt/ip

Table Of Contents

API

The package is available by importing its default function:

import ip from '@rqt/ip'

async ip(
  options?: Options,
): string

Returns the IP address as seen by an external web-server.

_rqt.IpOptions: Options for the request.

Name Type & Description Default
host string https://api.ipify.org
The address from which to get the IP address.
const GetIp = async (host) => {
  const res = await ip({ host })
  return res
}
127.0.0.1

Copyright

Art Deco © Art Deco for Rqt 2019 Tech Nation Visa Tech Nation Visa Sucks

About

Returns a public IP address of the host.

Resources

License

Stars

Watchers

Forks

Packages

No packages published