Skip to content

Vanilla-IceCream/private-ip-address

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

private-ip-address

Get your private IP address.

Installation

Install private-ip-address with your favorite package manager:

$ npm i private-ip-address -D
# or
$ yarn add private-ip-address -D
# or
$ pnpm i private-ip-address -D
# or
$ bun add private-ip-address -D

Usage

To use private-ip-address, import the internalIPv4 or internalIPv6 function:

// esm
import { internalIPv4, internalIPv6 } from 'private-ip-address';

// cjs
const { internalIPv4, internalIPv6 } = require('private-ip-address');

console.log(`Internal IPv4 address: ${internalIPv4()}`);
// Internal IPv4 address: 192.168.100.202

console.log(`Internal IPv6 address: ${internalIPv6()}`);
// Internal IPv6 address: fe80::ac97:42ff:fe19:cea

Releases

No releases published

Packages

No packages published