@cfworker/uuid
TypeScript icon, indicating that this package has built-in type declarations

1.12.4 • Public • Published

@cfworker/uuid

Serialize/deserialize V4 UUIDs from a Uint8Array.

🛑 Use crypto.randomUUID() if you only need to generate V4 UUIDs.

usage

import { uuid } from '@cfworker/uuid';

// generate a uuid (uses crypto.randomUUID())
const id = uuid();

// deserialize/serialize Uint8Array
const array: Uint8Array = parseUuid('129aa5a9-fa7b-4bed-8fb2-d88047926c6f');
const uuid = uuid(array); // '129aa5a9-fa7b-4bed-8fb2-d88047926c6f'

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @cfworker/uuid

    Weekly Downloads

    1,529

    Version

    1.12.4

    License

    MIT

    Unpacked Size

    6.82 kB

    Total Files

    7

    Last publish

    Collaborators

    • jdanyow