Skip to content

Commit

Permalink
chore(doc): re-generate README
Browse files Browse the repository at this point in the history
  • Loading branch information
ctavan committed Aug 26, 2019
1 parent ab33c8a commit 3558913
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,26 @@ Example: In-place generation of two binary IDs
```javascript
// Generate two ids in an array
const arr = new Array();
uuidv1(null, arr, 0); // ⇨ [ 44, 94, 164, 192, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125 ]
uuidv1(null, arr, 16); // ⇨ [ 44, 94, 164, 192, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125, 44, 94, 164, 193, 64, 103, 17, 233, 146, 52, 155, 29, 235, 77, 59, 125 ]
uuidv1(null, arr, 0); //
// [
// 44, 94, 164,
// 192, 64, 103,
// 17, 233, 146,
// 52, 155, 29,
// 235, 77, 59,
// 125
// ]
uuidv1(null, arr, 16); //
// [
// 44, 94, 164, 192,
// 64, 103, 17, 233,
// 146, 52, 155, 29,
// 235, 77, 59, 125,
// 44, 94, 164, 193,
// 64, 103, 17, 233,
// 146, 52, 155, 29,
// 235, 77, 59, 125
// ]

```

Expand Down Expand Up @@ -237,8 +255,26 @@ Example: Generate two IDs in a single buffer

```javascript
const buffer = new Array();
uuidv4(null, buffer, 0); // ⇨ [ 155, 29, 235, 77, 59, 125, 75, 173, 155, 221, 43, 13, 123, 61, 203, 109 ]
uuidv4(null, buffer, 16); // ⇨ [ 155, 29, 235, 77, 59, 125, 75, 173, 155, 221, 43, 13, 123, 61, 203, 109, 27, 157, 107, 205, 187, 253, 75, 45, 155, 93, 171, 141, 251, 189, 75, 237 ]
uuidv4(null, buffer, 0); //
// [
// 155, 29, 235,
// 77, 59, 125,
// 75, 173, 155,
// 221, 43, 13,
// 123, 61, 203,
// 109
// ]
uuidv4(null, buffer, 16); //
// [
// 155, 29, 235, 77,
// 59, 125, 75, 173,
// 155, 221, 43, 13,
// 123, 61, 203, 109,
// 27, 157, 107, 205,
// 187, 253, 75, 45,
// 155, 93, 171, 141,
// 251, 189, 75, 237
// ]

```

Expand Down

0 comments on commit 3558913

Please sign in to comment.