source: imaps-frontend/node_modules/uuid/dist/cjs/v4.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: 778 bytes
RevLine 
[79a0317]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const native_js_1 = require("./native.js");
4const rng_js_1 = require("./rng.js");
5const stringify_js_1 = require("./stringify.js");
6function v4(options, buf, offset) {
7 if (native_js_1.default.randomUUID && !buf && !options) {
8 return native_js_1.default.randomUUID();
9 }
10 options = options || {};
11 const rnds = options.random || (options.rng || rng_js_1.default)();
12 rnds[6] = (rnds[6] & 0x0f) | 0x40;
13 rnds[8] = (rnds[8] & 0x3f) | 0x80;
14 if (buf) {
15 offset = offset || 0;
16 for (let i = 0; i < 16; ++i) {
17 buf[offset + i] = rnds[i];
18 }
19 return buf;
20 }
21 return (0, stringify_js_1.unsafeStringify)(rnds);
22}
23exports.default = v4;
Note: See TracBrowser for help on using the repository browser.