internal-ip

WebJar for internal-ip

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

internal-ip
Последняя версия

Последняя версия

6.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

internal-ip
WebJar for internal-ip
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/sindresorhus/internal-ip

Скачать internal-ip

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/internal-ip/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>internal-ip</artifactId>
    <version>6.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/internal-ip/
implementation 'org.webjars.npm:internal-ip:6.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/internal-ip/
implementation ("org.webjars.npm:internal-ip:6.2.0")
'org.webjars.npm:internal-ip:jar:6.2.0'
<dependency org="org.webjars.npm" name="internal-ip" rev="6.2.0">
  <artifact name="internal-ip" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='internal-ip', version='6.2.0')
)
libraryDependencies += "org.webjars.npm" % "internal-ip" % "6.2.0"
[org.webjars.npm/internal-ip "6.2.0"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.webjars.npm : default-gateway jar [6.0.0,7)
org.webjars.npm : ipaddr.js jar [1.9.1,2)
org.webjars.npm » is-ip jar [3.1.0,4)
org.webjars.npm » p-event jar [4.2.0,5)

Модули Проекта

Данный проект не имеет модулей.

internal-ip Build Status

Get your internal IP address

Install

$ npm install internal-ip

Usage

const internalIp = require('internal-ip');

(async () => {
	console.log(await internalIp.v6());
	//=> 'fe80::1'

	console.log(await internalIp.v4());
	//=> '10.0.0.79'
})();

console.log(internalIp.v6.sync())
//=> 'fe80::1'

console.log(internalIp.v4.sync())
//=> '10.0.0.79'

The module returns the address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, undefined will be returned.

The module relies on operating systems tools. On Linux and Android, the ip command must be available, which depending on distribution might not be installed by default. It is usually provided by the iproute2 package. .v4.sync() and .v6.sync() are not supported in browsers and just return undefined.

Related


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Версии библиотеки

Версия
6.2.0
4.3.0
4.2.0
1.2.0