UUID as a buffer.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
TheoryOfNekomata 2d7128e43c Initial commit 2 年前
src Initial commit 2 年前
test Initial commit 2 年前
.eslintrc Initial commit 2 年前
.gitignore Initial commit 2 年前
LICENSE Initial commit 2 年前
README.md Initial commit 2 年前
package.json Initial commit 2 年前
pridepack.json Initial commit 2 年前
tsconfig.eslint.json Initial commit 2 年前
tsconfig.json Initial commit 2 年前
yarn.lock Initial commit 2 年前

README.md

uuid-buffer

UUID as a Buffer.

UUIDs are 128-bit values used for identification of entities. Representing them as strings are expensive since it can incur more than 128 bits. This library will help properly represent UUID values while still having some utility methods like serialization (i.e. converting them to string representations), as well as generation according to the v4 spec.

Usage

import { Uuid } from '@theoryofnekomata/uuid-buffer';

const newUuidV4 = Uuid.v4(); // sync

let uuidStr = '1d4a8818-a773-4b52-9b6b-4db8c7fd9bf2';

// this method can accept strings, buffers, and bute arrays
const uuidFromStr = Uuid.from(uuidStr);

License

See LICENSE file for details.