Skip to content

Commit 0423d49

Browse files
authored
docs: remove obsolete v1 option notes (#915)
1 parent cbd5b4b commit 0423d49

2 files changed

Lines changed: 5 additions & 21 deletions

File tree

README.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ npm install uuid
3434
```javascript
3535
import { v4 as uuidv4 } from 'uuid';
3636

37-
uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
37+
uuidv4(); // ⇨ '23c37ede-1c09-422a-8da8-42ad65cc33f9'
3838
```
3939

4040
For timestamp UUIDs, namespace UUIDs, and other options read on ...
@@ -174,20 +174,12 @@ Create an RFC version 1 (timestamp) UUID
174174
| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
175175
| _throws_ | `Error` if more than 10M UUIDs/sec are requested |
176176

177-
<!-- prettier-ignore -->
178-
> [!NOTE]
179-
> 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.
180-
181-
<!-- prettier-ignore -->
182-
> [!NOTE]
183-
> `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields.
184-
185177
Example:
186178

187179
```javascript
188180
import { v1 as uuidv1 } from 'uuid';
189181

190-
uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-9b5d-ab8dfbbd4bed'
182+
uuidv1(); // ⇨ 'a2bfad10-b358-11f0-8d45-6389dd784317'
191183
```
192184

193185
Example using `options`:
@@ -242,7 +234,7 @@ Example:
242234
```javascript
243235
import { v4 as uuidv4 } from 'uuid';
244236

245-
uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
237+
uuidv4(); // ⇨ '177fac08-7fee-4a08-abda-72eb3ce87fba'
246238
```
247239

248240
Example using predefined `random` values:
@@ -318,7 +310,7 @@ This method takes the same arguments as uuid.v1().
318310
```javascript
319311
import { v6 as uuidv6 } from 'uuid';
320312

321-
uuidv6(); // ⇨ '1e940672-c5ea-64c1-9bdd-2b0d7b3dcb6d'
313+
uuidv6(); // ⇨ '1f0b358a-2c04-6950-8ac9-a8f01d2998d6'
322314
```
323315

324316
Example using `options`:
@@ -365,7 +357,7 @@ Example:
365357
```javascript
366358
import { v7 as uuidv7 } from 'uuid';
367359

368-
uuidv7(); // ⇨ '01695553-c90c-745a-b76f-770d7b3dcb6d'
360+
uuidv7(); // ⇨ '019a26ab-9a66-71a9-a89e-63c35fce4a5a'
369361
```
370362

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

README_js.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,6 @@ Create an RFC version 1 (timestamp) UUID
171171
| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
172172
| _throws_ | `Error` if more than 10M UUIDs/sec are requested |
173173

174-
<!-- prettier-ignore -->
175-
> [!NOTE]
176-
> 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.
177-
178-
<!-- prettier-ignore -->
179-
> [!NOTE]
180-
> `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields.
181-
182174
Example:
183175

184176
```javascript --run

0 commit comments

Comments
 (0)