source: imaps-frontend/node_modules/uuid/dist/cjs-browser/rng.js

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

F4 Finalna Verzija

  • Property mode set to 100644
File size: 525 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.default = rng;
4let getRandomValues;
5const rnds8 = new Uint8Array(16);
6function rng() {
7 if (!getRandomValues) {
8 if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
9 throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
10 }
11 getRandomValues = crypto.getRandomValues.bind(crypto);
12 }
13 return getRandomValues(rnds8);
14}
Note: See TracBrowser for help on using the repository browser.