uid-safe

WebJar for uid-safe

Лицензия

Лицензия

MIT
Группа

Группа

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

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

uid-safe
Последняя версия

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

2.1.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

uid-safe
WebJar for uid-safe
Ссылка на сайт

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

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

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

https://github.com/crypto-utils/uid-safe

Скачать uid-safe

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : random-bytes jar [1.0.0,1.1)

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

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

uid-safe

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

URL and cookie safe UIDs

Create cryptographically secure UIDs safe for both cookie and URL usage. This is in contrast to modules such as uid2 whose UIDs are actually skewed due to the use of % and unnecessarily truncate the UID. Use this if you could still use UIDs with - and _ in them.

Installation

$ npm install uid-safe

API

var uid = require('uid-safe')

uid(byteLength, callback)

Asynchronously create a UID with a specific byte length. Because base64 encoding is used underneath, this is not the string length. For example, to create a UID of length 24, you want a byte length of 18.

uid(18, function (err, string) {
  if (err) throw err
  // do something with the string
})

uid(byteLength)

Asynchronously create a UID with a specific byte length and return a Promise.

Note: To use promises in Node.js prior to 0.12, promises must be "polyfilled" using global.Promise = require('bluebird').

uid(18).then(function (string) {
  // do something with the string
})

uid.sync(byteLength)

A synchronous version of above.

var string = uid.sync(18)

License

MIT

org.webjars.npm

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

Версия
2.1.5