source: imaps-frontend/node_modules/uuid/dist/esm-browser/rng.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 440 bytes
RevLine 
[79a0317]1let getRandomValues;
2const rnds8 = new Uint8Array(16);
3export default function rng() {
4 if (!getRandomValues) {
5 if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
6 throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
7 }
8 getRandomValues = crypto.getRandomValues.bind(crypto);
9 }
10 return getRandomValues(rnds8);
11}
Note: See TracBrowser for help on using the repository browser.