private-ip-address
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i private-ip-address

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.4 kB

Total Files

7

Last publish

Collaborators

  • shyam-chen