Content-Length: 301930 | pFad | http://github.com/roeib/JavaScript-snippets/commit/582356cbe3d5a14e7c33d71f4743ff7bd45fdcd9

7E randomUUID · roeib/JavaScript-snippets@582356c · GitHub
Skip to content

Commit 582356c

Browse files
authored
randomUUID
1 parent 0f3bfaa commit 582356c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
|41 | [How to convert an array of key-value tuples into an object](#How-to-convert-an-array-of-key-value-tuples-into-an-object)|
4848
|42 | [Native text to speech JS](#Native-text-to-speech-JS)|
4949
|43 | [toFixed](#toFixed)|
50+
|44 | [generate randomUUID](#generate-random-uuid)|
51+
52+
53+
5054

5155

5256

@@ -939,3 +943,18 @@ Warning: Floating point numbers cannot represent all decimals precisely in binar
939943
2.65.toFixed(1) // Returns '2.6'. Note it rounds down -why??? see the warning above
940944
941945
```
946+
947+
948+
**[⬆ Back to Top](#table-of-contents)**
949+
### generate random uuid
950+
951+
The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
952+
953+
```javascript
954+
955+
crypto.randomUUID() // print in console '460ff1e6-2106-4848-833d-5c5b3bfdc943'
956+
957+
crypto.randomUUID() // print in console '9a91c014-d1b1-453a-8091-ef8b9b48b14a'
958+
959+
960+
```

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/roeib/JavaScript-snippets/commit/582356cbe3d5a14e7c33d71f4743ff7bd45fdcd9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy