uuid 11.0.5 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -30
- package/dist/{esm/md5.js → md5.js} +1 -1
- package/dist/{esm/native.d.ts → native.d.ts} +1 -1
- package/dist/native.js +2 -0
- package/dist/{esm/rng.js → rng.js} +1 -1
- package/dist/{esm/sha1.js → sha1.js} +1 -1
- package/dist/{cjs-browser/types.d.ts → types.d.ts} +1 -1
- package/dist/{esm/uuid-bin.js → uuid-bin.js} +1 -1
- package/dist/{esm-browser/v1.d.ts → v1.d.ts} +1 -1
- package/dist/{esm/v1.js → v1.js} +1 -1
- package/dist/{esm-browser/v3.d.ts → v3.d.ts} +1 -1
- package/dist/{cjs/v35.d.ts → v35.d.ts} +1 -1
- package/dist/{cjs/v4.d.ts → v4.d.ts} +1 -1
- package/dist/{esm-browser/v4.js → v4.js} +7 -4
- package/dist/{cjs/v5.d.ts → v5.d.ts} +1 -1
- package/dist/{esm-browser/v6.d.ts → v6.d.ts} +1 -1
- package/dist/{esm-browser/v7.d.ts → v7.d.ts} +1 -1
- package/dist/{esm-browser/v7.js → v7.js} +1 -1
- package/{dist/esm-browser → dist-browser}/uuid-bin.js +1 -1
- package/{dist/esm-browser → dist-browser}/v1.js +1 -1
- package/{dist/esm → dist-browser}/v4.js +7 -4
- package/{dist/esm → dist-browser}/v7.js +1 -1
- package/package.json +27 -40
- package/dist/cjs/index.d.ts +0 -15
- package/dist/cjs/index.js +0 -31
- package/dist/cjs/max.d.ts +0 -2
- package/dist/cjs/max.js +0 -3
- package/dist/cjs/md5.d.ts +0 -4
- package/dist/cjs/md5.js +0 -13
- package/dist/cjs/native.d.ts +0 -6
- package/dist/cjs/native.js +0 -4
- package/dist/cjs/nil.d.ts +0 -2
- package/dist/cjs/nil.js +0 -3
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/parse.d.ts +0 -2
- package/dist/cjs/parse.js +0 -11
- package/dist/cjs/regex.d.ts +0 -2
- package/dist/cjs/regex.js +0 -3
- package/dist/cjs/rng.d.ts +0 -1
- package/dist/cjs/rng.js +0 -13
- package/dist/cjs/sha1.d.ts +0 -4
- package/dist/cjs/sha1.js +0 -13
- package/dist/cjs/stringify.d.ts +0 -3
- package/dist/cjs/stringify.js +0 -39
- package/dist/cjs/types.d.ts +0 -21
- package/dist/cjs/types.js +0 -2
- package/dist/cjs/uuid-bin.d.ts +0 -1
- package/dist/cjs/uuid-bin.js +0 -72
- package/dist/cjs/v1.d.ts +0 -11
- package/dist/cjs/v1.js +0 -87
- package/dist/cjs/v1ToV6.d.ts +0 -2
- package/dist/cjs/v1ToV6.js +0 -13
- package/dist/cjs/v3.d.ts +0 -9
- package/dist/cjs/v3.js +0 -14
- package/dist/cjs/v35.js +0 -41
- package/dist/cjs/v4.js +0 -29
- package/dist/cjs/v5.js +0 -14
- package/dist/cjs/v6.d.ts +0 -4
- package/dist/cjs/v6.js +0 -19
- package/dist/cjs/v6ToV1.d.ts +0 -2
- package/dist/cjs/v6ToV1.js +0 -13
- package/dist/cjs/v7.d.ts +0 -9
- package/dist/cjs/v7.js +0 -69
- package/dist/cjs/validate.d.ts +0 -2
- package/dist/cjs/validate.js +0 -7
- package/dist/cjs/version.d.ts +0 -2
- package/dist/cjs/version.js +0 -10
- package/dist/cjs-browser/index.js +0 -31
- package/dist/cjs-browser/max.js +0 -3
- package/dist/cjs-browser/md5.d.ts +0 -2
- package/dist/cjs-browser/md5.js +0 -137
- package/dist/cjs-browser/native.d.ts +0 -4
- package/dist/cjs-browser/native.js +0 -4
- package/dist/cjs-browser/nil.js +0 -3
- package/dist/cjs-browser/package.json +0 -1
- package/dist/cjs-browser/parse.js +0 -11
- package/dist/cjs-browser/regex.js +0 -3
- package/dist/cjs-browser/rng.js +0 -14
- package/dist/cjs-browser/sha1.d.ts +0 -2
- package/dist/cjs-browser/sha1.js +0 -72
- package/dist/cjs-browser/stringify.js +0 -39
- package/dist/cjs-browser/types.js +0 -2
- package/dist/cjs-browser/uuid-bin.js +0 -72
- package/dist/cjs-browser/v1.d.ts +0 -11
- package/dist/cjs-browser/v1.js +0 -87
- package/dist/cjs-browser/v1ToV6.js +0 -13
- package/dist/cjs-browser/v3.d.ts +0 -9
- package/dist/cjs-browser/v3.js +0 -14
- package/dist/cjs-browser/v35.d.ts +0 -7
- package/dist/cjs-browser/v35.js +0 -41
- package/dist/cjs-browser/v4.d.ts +0 -4
- package/dist/cjs-browser/v4.js +0 -29
- package/dist/cjs-browser/v5.d.ts +0 -9
- package/dist/cjs-browser/v5.js +0 -14
- package/dist/cjs-browser/v6.d.ts +0 -4
- package/dist/cjs-browser/v6.js +0 -19
- package/dist/cjs-browser/v6ToV1.js +0 -13
- package/dist/cjs-browser/v7.d.ts +0 -9
- package/dist/cjs-browser/v7.js +0 -69
- package/dist/cjs-browser/validate.js +0 -7
- package/dist/cjs-browser/version.js +0 -10
- package/dist/esm/index.d.ts +0 -15
- package/dist/esm/max.d.ts +0 -2
- package/dist/esm/native.js +0 -2
- package/dist/esm/nil.d.ts +0 -2
- package/dist/esm/parse.d.ts +0 -2
- package/dist/esm/regex.d.ts +0 -2
- package/dist/esm/rng.d.ts +0 -1
- package/dist/esm/stringify.d.ts +0 -3
- package/dist/esm/types.d.ts +0 -21
- package/dist/esm/uuid-bin.d.ts +0 -1
- package/dist/esm/v1.d.ts +0 -11
- package/dist/esm/v1ToV6.d.ts +0 -2
- package/dist/esm/v3.d.ts +0 -9
- package/dist/esm/v35.d.ts +0 -7
- package/dist/esm/v4.d.ts +0 -4
- package/dist/esm/v5.d.ts +0 -9
- package/dist/esm/v6.d.ts +0 -4
- package/dist/esm/v6ToV1.d.ts +0 -2
- package/dist/esm/v7.d.ts +0 -9
- package/dist/esm/validate.d.ts +0 -2
- package/dist/esm/version.d.ts +0 -2
- package/dist/esm-browser/index.d.ts +0 -15
- package/dist/esm-browser/max.d.ts +0 -2
- package/dist/esm-browser/md5.d.ts +0 -2
- package/dist/esm-browser/native.d.ts +0 -4
- package/dist/esm-browser/nil.d.ts +0 -2
- package/dist/esm-browser/parse.d.ts +0 -2
- package/dist/esm-browser/regex.d.ts +0 -2
- package/dist/esm-browser/rng.d.ts +0 -1
- package/dist/esm-browser/sha1.d.ts +0 -2
- package/dist/esm-browser/stringify.d.ts +0 -3
- package/dist/esm-browser/types.d.ts +0 -21
- package/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/dist/esm-browser/v35.d.ts +0 -7
- package/dist/esm-browser/v4.d.ts +0 -4
- package/dist/esm-browser/v5.d.ts +0 -9
- package/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/dist/esm-browser/validate.d.ts +0 -2
- package/dist/esm-browser/version.d.ts +0 -2
- /package/dist/{esm/bin → bin}/uuid +0 -0
- /package/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
- /package/dist/{esm/index.js → index.js} +0 -0
- /package/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
- /package/dist/{esm/max.js → max.js} +0 -0
- /package/dist/{esm/md5.d.ts → md5.d.ts} +0 -0
- /package/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
- /package/dist/{esm/nil.js → nil.js} +0 -0
- /package/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
- /package/dist/{esm/parse.js → parse.js} +0 -0
- /package/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
- /package/dist/{esm/regex.js → regex.js} +0 -0
- /package/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
- /package/dist/{esm/sha1.d.ts → sha1.d.ts} +0 -0
- /package/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
- /package/dist/{esm/stringify.js → stringify.js} +0 -0
- /package/dist/{esm/types.js → types.js} +0 -0
- /package/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
- /package/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
- /package/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
- /package/dist/{esm/v3.js → v3.js} +0 -0
- /package/dist/{esm/v35.js → v35.js} +0 -0
- /package/dist/{esm/v5.js → v5.js} +0 -0
- /package/dist/{esm/v6.js → v6.js} +0 -0
- /package/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
- /package/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
- /package/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
- /package/dist/{esm/validate.js → validate.js} +0 -0
- /package/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
- /package/dist/{esm/version.js → version.js} +0 -0
- /package/{dist/esm-browser → dist-browser}/index.js +0 -0
- /package/{dist/esm-browser → dist-browser}/max.js +0 -0
- /package/{dist/esm-browser → dist-browser}/md5.js +0 -0
- /package/{dist/esm-browser → dist-browser}/native.js +0 -0
- /package/{dist/esm-browser → dist-browser}/nil.js +0 -0
- /package/{dist/esm-browser → dist-browser}/parse.js +0 -0
- /package/{dist/esm-browser → dist-browser}/regex.js +0 -0
- /package/{dist/esm-browser → dist-browser}/rng.js +0 -0
- /package/{dist/esm-browser → dist-browser}/sha1.js +0 -0
- /package/{dist/esm-browser → dist-browser}/stringify.js +0 -0
- /package/{dist/esm-browser → dist-browser}/types.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v1ToV6.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v3.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v35.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v5.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v6.js +0 -0
- /package/{dist/esm-browser → dist-browser}/v6ToV1.js +0 -0
- /package/{dist/esm-browser → dist-browser}/validate.js +0 -0
- /package/{dist/esm-browser → dist-browser}/version.js +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parse_js_1 = require("./parse.js");
|
|
4
|
-
const stringify_js_1 = require("./stringify.js");
|
|
5
|
-
function v6ToV1(uuid) {
|
|
6
|
-
const v6Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;
|
|
7
|
-
const v1Bytes = _v6ToV1(v6Bytes);
|
|
8
|
-
return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v1Bytes) : v1Bytes;
|
|
9
|
-
}
|
|
10
|
-
exports.default = v6ToV1;
|
|
11
|
-
function _v6ToV1(v6Bytes) {
|
|
12
|
-
return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
|
|
13
|
-
}
|
package/dist/cjs-browser/v7.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Version7Options } from './types.js';
|
|
2
|
-
type V7State = {
|
|
3
|
-
msecs?: number;
|
|
4
|
-
seq?: number;
|
|
5
|
-
};
|
|
6
|
-
declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string;
|
|
7
|
-
declare function v7(options: Version7Options | undefined, buf: Uint8Array, offset?: number): Uint8Array;
|
|
8
|
-
export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State;
|
|
9
|
-
export default v7;
|
package/dist/cjs-browser/v7.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateV7State = void 0;
|
|
4
|
-
const rng_js_1 = require("./rng.js");
|
|
5
|
-
const stringify_js_1 = require("./stringify.js");
|
|
6
|
-
const _state = {};
|
|
7
|
-
function v7(options, buf, offset) {
|
|
8
|
-
let bytes;
|
|
9
|
-
if (options) {
|
|
10
|
-
bytes = v7Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.seq, buf, offset);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
const now = Date.now();
|
|
14
|
-
const rnds = (0, rng_js_1.default)();
|
|
15
|
-
updateV7State(_state, now, rnds);
|
|
16
|
-
bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);
|
|
17
|
-
}
|
|
18
|
-
return buf ? bytes : (0, stringify_js_1.unsafeStringify)(bytes);
|
|
19
|
-
}
|
|
20
|
-
function updateV7State(state, now, rnds) {
|
|
21
|
-
state.msecs ??= -Infinity;
|
|
22
|
-
state.seq ??= 0;
|
|
23
|
-
if (now > state.msecs) {
|
|
24
|
-
state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
25
|
-
state.msecs = now;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
state.seq = (state.seq + 1) | 0;
|
|
29
|
-
if (state.seq === 0) {
|
|
30
|
-
state.msecs++;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return state;
|
|
34
|
-
}
|
|
35
|
-
exports.updateV7State = updateV7State;
|
|
36
|
-
function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
|
|
37
|
-
if (rnds.length < 16) {
|
|
38
|
-
throw new Error('Random bytes length must be >= 16');
|
|
39
|
-
}
|
|
40
|
-
if (!buf) {
|
|
41
|
-
buf = new Uint8Array(16);
|
|
42
|
-
offset = 0;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
46
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
msecs ??= Date.now();
|
|
50
|
-
seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
51
|
-
buf[offset++] = (msecs / 0x10000000000) & 0xff;
|
|
52
|
-
buf[offset++] = (msecs / 0x100000000) & 0xff;
|
|
53
|
-
buf[offset++] = (msecs / 0x1000000) & 0xff;
|
|
54
|
-
buf[offset++] = (msecs / 0x10000) & 0xff;
|
|
55
|
-
buf[offset++] = (msecs / 0x100) & 0xff;
|
|
56
|
-
buf[offset++] = msecs & 0xff;
|
|
57
|
-
buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);
|
|
58
|
-
buf[offset++] = (seq >>> 20) & 0xff;
|
|
59
|
-
buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);
|
|
60
|
-
buf[offset++] = (seq >>> 6) & 0xff;
|
|
61
|
-
buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);
|
|
62
|
-
buf[offset++] = rnds[11];
|
|
63
|
-
buf[offset++] = rnds[12];
|
|
64
|
-
buf[offset++] = rnds[13];
|
|
65
|
-
buf[offset++] = rnds[14];
|
|
66
|
-
buf[offset++] = rnds[15];
|
|
67
|
-
return buf;
|
|
68
|
-
}
|
|
69
|
-
exports.default = v7;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const validate_js_1 = require("./validate.js");
|
|
4
|
-
function version(uuid) {
|
|
5
|
-
if (!(0, validate_js_1.default)(uuid)) {
|
|
6
|
-
throw TypeError('Invalid UUID');
|
|
7
|
-
}
|
|
8
|
-
return parseInt(uuid.slice(14, 15), 16);
|
|
9
|
-
}
|
|
10
|
-
exports.default = version;
|
package/dist/esm/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type * from './types.js';
|
|
2
|
-
export { default as MAX } from './max.js';
|
|
3
|
-
export { default as NIL } from './nil.js';
|
|
4
|
-
export { default as parse } from './parse.js';
|
|
5
|
-
export { default as stringify } from './stringify.js';
|
|
6
|
-
export { default as v1 } from './v1.js';
|
|
7
|
-
export { default as v1ToV6 } from './v1ToV6.js';
|
|
8
|
-
export { default as v3 } from './v3.js';
|
|
9
|
-
export { default as v4 } from './v4.js';
|
|
10
|
-
export { default as v5 } from './v5.js';
|
|
11
|
-
export { default as v6 } from './v6.js';
|
|
12
|
-
export { default as v6ToV1 } from './v6ToV1.js';
|
|
13
|
-
export { default as v7 } from './v7.js';
|
|
14
|
-
export { default as validate } from './validate.js';
|
|
15
|
-
export { default as version } from './version.js';
|
package/dist/esm/max.d.ts
DELETED
package/dist/esm/native.js
DELETED
package/dist/esm/nil.d.ts
DELETED
package/dist/esm/parse.d.ts
DELETED
package/dist/esm/regex.d.ts
DELETED
package/dist/esm/rng.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function rng(): Uint8Array;
|
package/dist/esm/stringify.d.ts
DELETED
package/dist/esm/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type UUIDTypes = string | Uint8Array;
|
|
2
|
-
export type Version1Options = {
|
|
3
|
-
node?: Uint8Array;
|
|
4
|
-
clockseq?: number;
|
|
5
|
-
random?: Uint8Array;
|
|
6
|
-
rng?: () => Uint8Array;
|
|
7
|
-
msecs?: number;
|
|
8
|
-
nsecs?: number;
|
|
9
|
-
_v6?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type Version4Options = {
|
|
12
|
-
random?: Uint8Array;
|
|
13
|
-
rng?: () => Uint8Array;
|
|
14
|
-
};
|
|
15
|
-
export type Version6Options = Version1Options;
|
|
16
|
-
export type Version7Options = {
|
|
17
|
-
random?: Uint8Array;
|
|
18
|
-
msecs?: number;
|
|
19
|
-
seq?: number;
|
|
20
|
-
rng?: () => Uint8Array;
|
|
21
|
-
};
|
package/dist/esm/uuid-bin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/esm/v1.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Version1Options } from './types.js';
|
|
2
|
-
type V1State = {
|
|
3
|
-
node?: Uint8Array;
|
|
4
|
-
clockseq?: number;
|
|
5
|
-
msecs?: number;
|
|
6
|
-
nsecs?: number;
|
|
7
|
-
};
|
|
8
|
-
declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string;
|
|
9
|
-
declare function v1(options: Version1Options | undefined, buf: Uint8Array, offset?: number): Uint8Array;
|
|
10
|
-
export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State;
|
|
11
|
-
export default v1;
|
package/dist/esm/v1ToV6.d.ts
DELETED
package/dist/esm/v3.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export { DNS, URL } from './v35.js';
|
|
3
|
-
declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
-
declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: Uint8Array, offset?: number): Uint8Array;
|
|
5
|
-
declare namespace v3 {
|
|
6
|
-
var DNS: string;
|
|
7
|
-
var URL: string;
|
|
8
|
-
}
|
|
9
|
-
export default v3;
|
package/dist/esm/v35.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export declare function stringToBytes(str: string): Uint8Array;
|
|
3
|
-
export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
4
|
-
export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5
|
-
type HashFunction = (bytes: Uint8Array) => Uint8Array;
|
|
6
|
-
export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number): string | Uint8Array;
|
|
7
|
-
export {};
|
package/dist/esm/v4.d.ts
DELETED
package/dist/esm/v5.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export { DNS, URL } from './v35.js';
|
|
3
|
-
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
-
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: Uint8Array, offset?: number): Uint8Array;
|
|
5
|
-
declare namespace v5 {
|
|
6
|
-
var DNS: string;
|
|
7
|
-
var URL: string;
|
|
8
|
-
}
|
|
9
|
-
export default v5;
|
package/dist/esm/v6.d.ts
DELETED
package/dist/esm/v6ToV1.d.ts
DELETED
package/dist/esm/v7.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Version7Options } from './types.js';
|
|
2
|
-
type V7State = {
|
|
3
|
-
msecs?: number;
|
|
4
|
-
seq?: number;
|
|
5
|
-
};
|
|
6
|
-
declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string;
|
|
7
|
-
declare function v7(options: Version7Options | undefined, buf: Uint8Array, offset?: number): Uint8Array;
|
|
8
|
-
export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State;
|
|
9
|
-
export default v7;
|
package/dist/esm/validate.d.ts
DELETED
package/dist/esm/version.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type * from './types.js';
|
|
2
|
-
export { default as MAX } from './max.js';
|
|
3
|
-
export { default as NIL } from './nil.js';
|
|
4
|
-
export { default as parse } from './parse.js';
|
|
5
|
-
export { default as stringify } from './stringify.js';
|
|
6
|
-
export { default as v1 } from './v1.js';
|
|
7
|
-
export { default as v1ToV6 } from './v1ToV6.js';
|
|
8
|
-
export { default as v3 } from './v3.js';
|
|
9
|
-
export { default as v4 } from './v4.js';
|
|
10
|
-
export { default as v5 } from './v5.js';
|
|
11
|
-
export { default as v6 } from './v6.js';
|
|
12
|
-
export { default as v6ToV1 } from './v6ToV1.js';
|
|
13
|
-
export { default as v7 } from './v7.js';
|
|
14
|
-
export { default as validate } from './validate.js';
|
|
15
|
-
export { default as version } from './version.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function rng(): Uint8Array;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type UUIDTypes = string | Uint8Array;
|
|
2
|
-
export type Version1Options = {
|
|
3
|
-
node?: Uint8Array;
|
|
4
|
-
clockseq?: number;
|
|
5
|
-
random?: Uint8Array;
|
|
6
|
-
rng?: () => Uint8Array;
|
|
7
|
-
msecs?: number;
|
|
8
|
-
nsecs?: number;
|
|
9
|
-
_v6?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type Version4Options = {
|
|
12
|
-
random?: Uint8Array;
|
|
13
|
-
rng?: () => Uint8Array;
|
|
14
|
-
};
|
|
15
|
-
export type Version6Options = Version1Options;
|
|
16
|
-
export type Version7Options = {
|
|
17
|
-
random?: Uint8Array;
|
|
18
|
-
msecs?: number;
|
|
19
|
-
seq?: number;
|
|
20
|
-
rng?: () => Uint8Array;
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export declare function stringToBytes(str: string): Uint8Array;
|
|
3
|
-
export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
4
|
-
export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5
|
-
type HashFunction = (bytes: Uint8Array) => Uint8Array;
|
|
6
|
-
export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number): string | Uint8Array;
|
|
7
|
-
export {};
|
package/dist/esm-browser/v4.d.ts
DELETED
package/dist/esm-browser/v5.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export { DNS, URL } from './v35.js';
|
|
3
|
-
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
-
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: Uint8Array, offset?: number): Uint8Array;
|
|
5
|
-
declare namespace v5 {
|
|
6
|
-
var DNS: string;
|
|
7
|
-
var URL: string;
|
|
8
|
-
}
|
|
9
|
-
export default v5;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|