Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(uuidgen): add uppercase and uuidv4 examples #914

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions uuidv7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,30 @@ uuidv7 ; uuidv7 ; uuidv7
01928d74-3ffb-7e06-abe9-3fe20e5cb5f2
```

### How to Generate UPPER CASE (like `uuidgen`)

```sh
uuidv7 | tr '[:lower:]' '[:upper:]'
```

```text
01928D73-D8ED-7211-A314-7081D763271D
```

### How to Generate v4 UUIDs?

Use `uuidgen`.

```sh
uuidgen
uuidgen | tr '[:upper:]' '[:lower:]'
```

```text
84FA79E5-024E-4388-8D10-91618B93BE9D
84fa79e5-024e-4388-8d10-91618b93be9d
```

### How could I roll my own UUID v7 generator?

It's not that hard. There are examples in many languages here:
Expand Down
Loading