Skip to main content
Home

Finds and returns the local and public IP addresses of the machine

This package works with Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
10 months ago (1.0.1)

ipfinder

what does it do?

Finds and returns the local and public IP addresses of the machine

usage

deno add jsr:@emarti/ipfinder

sample.ts

import { getLocalIP, getPublicIP } from "@emarti/ipfinder";

console.log("Local IP(s):");
const localIPs = getLocalIP();
localIPs.forEach((ip) => console.log(`${ip}`));

console.log("\nPublic IP:");
const publicIP = await getPublicIP();
console.log(`${publicIP}`);
deno run --allow-sys --allow-net sample.ts

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";
or

Import directly with a jsr specifier

import * as ipfinder from "jsr:@emarti/ipfinder";

Add Package

pnpm i jsr:@emarti/ipfinder
or (using pnpm 10.8 or older)
pnpm dlx jsr add @emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";

Add Package

yarn add jsr:@emarti/ipfinder
or (using Yarn 4.8 or older)
yarn dlx jsr add @emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";

Add Package

vlt install jsr:@emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";

Add Package

npx jsr add @emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";

Add Package

bunx jsr add @emarti/ipfinder

Import symbol

import * as ipfinder from "@emarti/ipfinder";