Skip to content

Commit

Permalink
docs: document v8() as deliberately not-implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Jun 5, 2024
1 parent 4f13e5c commit f3a94e2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
-- This file is auto-generated from README_js.md. Changes should be made there.
-->


# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formally [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs

- **Complete** - Support for all RFC9562 UUID versions
- **Complete** - Support for RFC9562 version 1, 3, 4, 5, and 7 UUIDs
- **Cross-platform** - Support for ...
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
Expand Down Expand Up @@ -64,9 +65,10 @@ For timestamp UUIDs, namespace UUIDs, and other options read on ...
| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | |
| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | |
| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | |
| [`uuid.v6()`](#uuidv5name-namespace-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` |
| [`uuid.v6()`](#uuidv5name-namespace-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` |
| [`uuid.v6ToV1()`](#uuidv7options-buffer-offset) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` |
| [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` |
| ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | |
| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |
| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |

Expand Down Expand Up @@ -326,7 +328,7 @@ Convert a UUID from version 6 to version 1
```javascript
import { v6ToV1 } from 'uuid';

v6ToV1('92f62d9e-22c4-11ef-97e9-325096b39f47'); // ⇨ 'e22c41ef-62d9-192f-97e9-325096b39f47'
v6ToV1('1ef22c49-2f62-6d9e-97e9-325096b39f47'); // ⇨ '92f62d9e-22c4-11ef-97e9-325096b39f47'
```

### uuid.v7([options[, buffer[, offset]]])
Expand All @@ -352,6 +354,14 @@ import { v7 as uuidv7 } from 'uuid';
uuidv7(); // ⇨ '01695553-c90c-722d-9b5d-b38dfbbd4bed'
```

### ~~uuid.v8()~~

**_"Intentionally left blank"_**

<!-- prettier-ignore -->
> [!NOTE]
> Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however.
### uuid.validate(str)

Test a string to see if it is a valid UUID
Expand Down Expand Up @@ -569,5 +579,6 @@ const uuid = require('uuid'); // <== REMOVED!

This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.

----
Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](https://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
---

Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
9 changes: 9 additions & 0 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ For timestamp UUIDs, namespace UUIDs, and other options read on ...
| [`uuid.v6()`](#uuidv5name-namespace-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` |
| [`uuid.v6ToV1()`](#uuidv7options-buffer-offset) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` |
| [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` |
| ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | |
| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |
| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |

Expand Down Expand Up @@ -361,6 +362,14 @@ import { v7 as uuidv7 } from 'uuid';
uuidv7(); // RESULT
```

### ~~uuid.v8()~~

**_"Intentionally left blank"_**

<!-- prettier-ignore -->
> [!NOTE]
> Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however.
### uuid.validate(str)

Test a string to see if it is a valid UUID
Expand Down

0 comments on commit f3a94e2

Please sign in to comment.