dat-encoding

WebJar for dat-encoding

Лицензия

Лицензия

MIT
Группа

Группа

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

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

dat-encoding
Последняя версия

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

5.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

dat-encoding
WebJar for dat-encoding
Ссылка на сайт

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

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

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

https://github.com/dat-land/dat-encoding

Скачать dat-encoding

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : safe-buffer jar [5.0.1,6)

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

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

dat-encoding

Dat's way of encoding and decoding dat links.

Build Status

Example

var encoding = require('dat-encoding')

var link = '6161616161616161616161616161616161616161616161616161616161616161'
var buf = encoding.decode(link)
console.log('%s -> %s', link, buf)
console.log('%s -> %s', buf, encoding.encode(buf))

API

.encode(buf)

.toStr(buf)

Encode buf into a hex string. Throws if buf isn't 32 bytes of length.

If buf is already a string, checks if it's valid and returns it.

.decode(str)

.toBuf(str)

Decode str into its binary representation. Also supports dat:// and dat.com/ links. Throws if the raw link isn't 64 bytes of base64.

If str is already a buffer, checks if it's valid and returns it.

License

MIT

org.webjars.npm

datland

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

Версия
5.0.1