compact2string

WebJar for compact2string

Лицензия

Лицензия

BSD
Группа

Группа

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

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

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

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

1.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

compact2string
WebJar for compact2string
Ссылка на сайт

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

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

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

https://github.com/bencevans/node-compact2string

Скачать compact2string

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : ipaddr.js jar [0.1.5,)

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

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

compact2string

Convert bittorrent's compact ip/host binary returned by Trackers to 'hostname:port' string.

Build Status Coverage Status Dependency Status

browser support

Need the reverse of this? Checkout https://github.com/feross/string2compact

Installation

npm install compact2string

Usage

Single compact2string

var compact2string = require("compact2string");
var Buffer = require("buffer").Buffer;
var ipport = compact2string(new Buffer("0A0A0A05FF80", "hex"));
console.log(ipport);

=> "10.10.10.5:65408"

ipport = compact2string(new Buffer("2a03288021109f07faceb00c000000010050", "hex"));
console.log(ipport);

=> "[2a03:2880:2110:9f07:face:b00c::1]:80"

Multiple in same buffer

var hostports = compact2string.multi(new Buffer("0A0A0A05008064383a636f6d", "hex"));
console.log(hostports);

=> [ '10.10.10.5:128', '100.56.58.99:28525' ]

IPv6 version: compact2string.multi6()

Licence

(MIT Licence)

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

Версия
1.4.0