1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | const byteToHex = [];
|
13 |
|
14 | for (let i = 0; i < 256; ++i) {
|
15 | byteToHex.push((i + 0x100).toString(16).substr(1));
|
16 | }
|
17 |
|
18 | function bytesToUuid(buf, offset) {
|
19 | const i = offset || 0;
|
20 | const bth = byteToHex;
|
21 |
|
22 |
|
23 | return (bth[buf[i + 0]] + bth[buf[i + 1]] + bth[buf[i + 2]] + bth[buf[i + 3]] + '-' + bth[buf[i + 4]] + bth[buf[i + 5]] + '-' + bth[buf[i + 6]] + bth[buf[i + 7]] + '-' + bth[buf[i + 8]] + bth[buf[i + 9]] + '-' + bth[buf[i + 10]] + bth[buf[i + 11]] + bth[buf[i + 12]] + bth[buf[i + 13]] + bth[buf[i + 14]] + bth[buf[i + 15]]).toLowerCase();
|
24 | }
|
25 |
|
26 | var _default = bytesToUuid;
|
27 | exports.default = _default; |
\ | No newline at end of file |