mirror of
https://github.com/hanzoai/uuid.git
synced 2026-09-24 17:04:02 +00:00
docs: updates for RFC9562 (#753)
This commit is contained in:
@@ -2,12 +2,11 @@
|
||||
-- This file is auto-generated from README_js.md. Changes should be made there.
|
||||
-->
|
||||
|
||||
|
||||
# uuid [](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)
|
||||
|
||||
For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
|
||||
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 RFC4122 version 1, 3, 4, 5, and 7 UUIDs
|
||||
- **Complete** - Support for all RFC9562 UUID versions
|
||||
- **Cross-platform** - Support for ...
|
||||
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
|
||||
- NodeJS 16+ ([LTS releases](https://github.com/nodejs/Release))
|
||||
@@ -173,7 +172,7 @@ Create an RFC version 1 (timestamp) UUID
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!NOTE]
|
||||
> The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
|
||||
> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!NOTE]
|
||||
@@ -386,7 +385,7 @@ Usage:
|
||||
uuid --help
|
||||
|
||||
Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
|
||||
defined by RFC4122
|
||||
defined by RFC9562
|
||||
```
|
||||
|
||||
## ECMAScript Modules
|
||||
@@ -521,6 +520,5 @@ 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 <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
|
||||
----
|
||||
Markdown generated from [README_js.md](README_js.md) by [](https://github.com/broofa/runmd)
|
||||
+4
-4
@@ -19,9 +19,9 @@ require('crypto').randomUUID = undefined;
|
||||
|
||||
# uuid [](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)
|
||||
|
||||
For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
|
||||
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 RFC4122 version 1, 3, 4, 5, and 7 UUIDs
|
||||
- **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))
|
||||
@@ -181,7 +181,7 @@ Create an RFC version 1 (timestamp) UUID
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!NOTE]
|
||||
> The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
|
||||
> The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
> [!NOTE]
|
||||
@@ -394,7 +394,7 @@ Usage:
|
||||
uuid --help
|
||||
|
||||
Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
|
||||
defined by RFC4122
|
||||
defined by RFC9562
|
||||
```
|
||||
|
||||
## ECMAScript Modules
|
||||
|
||||
@@ -46,7 +46,7 @@ export default function benchmark(uuid, Benchmark) {
|
||||
try {
|
||||
uuid.v1(null, array, 0);
|
||||
} catch (err) {
|
||||
// The spec (https://tools.ietf.org/html/rfc4122#section-4.2.1.2) defines that only 10M/s v1
|
||||
// The spec (https://datatracker.ietf.org/doc/html/rfc9562#name-timestamp-considerations) defines that only 10M/s v1
|
||||
// UUIDs can be generated on a single node. This library throws an error if we hit that limit
|
||||
// (which can happen on modern hardware and modern Node.js versions).
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "uuid",
|
||||
"version": "9.0.1",
|
||||
"description": "RFC4122 (v1, v3, v4, v5, and v7) UUIDs",
|
||||
"description": "RFC9562 UUIDs",
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa",
|
||||
"https://github.com/sponsors/ctavan"
|
||||
@@ -14,7 +14,8 @@
|
||||
"keywords": [
|
||||
"uuid",
|
||||
"guid",
|
||||
"rfc4122"
|
||||
"rfc4122",
|
||||
"rfc9562"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ function usage() {
|
||||
console.log(' uuid v7');
|
||||
console.log(' uuid --help');
|
||||
console.log(
|
||||
'\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'
|
||||
'\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user