mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(UUID Generator): add v6 and v7 versions
This commit is contained in:
1 parent
0de2ed10b9
commit
434001a605
3 files changed
+916
-665
No files matched your search
+6
-7
@@ -127,7 +127,6 @@
|
||||
"highlight.js": "^11.7.0",
|
||||
"iarna-toml-esm": "^3.0.5",
|
||||
"ibantools": "^4.3.3",
|
||||
"json-to-ts": "^1.7.0",
|
||||
"ical-generator": "^8.0.1",
|
||||
"ical.js": "^2.1.0",
|
||||
"iconv-lite": "^0.6.3",
|
||||
@@ -151,14 +150,15 @@
|
||||
"jsbarcode": "^3.11.6",
|
||||
"json-analyzer": "^1.2.2",
|
||||
"json-editor-vue": "^0.16.0",
|
||||
"json-to-ts": "^1.7.0",
|
||||
"json2csharp": "^1.0.3",
|
||||
"json5": "^2.2.3",
|
||||
"jszip": "^3.10.1",
|
||||
"jsonar-mod": "^1.9.0",
|
||||
"jsonlint-mod": "^1.7.6",
|
||||
"jsonpath": "^1.1.1",
|
||||
"jsstack.js": "^2.0.0",
|
||||
"jsvat-next": "^3.0.4",
|
||||
"jszip": "^3.10.1",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"korean-unpacker": "^1.0.3",
|
||||
"libmime": "^5.3.5",
|
||||
@@ -203,7 +203,6 @@
|
||||
"pythonstack.js": "^1.0.2",
|
||||
"qpdf-wasm-esm-embedded": "^1.1.1",
|
||||
"qrcode": "^1.5.1",
|
||||
"sanitize-html": "^2.13.1",
|
||||
"qrcode-parser": "^2.1.3",
|
||||
"qrcode-terminal-nooctal": "^0.12.1",
|
||||
"randexp": "^0.5.3",
|
||||
@@ -211,13 +210,14 @@
|
||||
"roboto-base64": "^0.1.2",
|
||||
"rtf-stream-parser": "^3.8.0",
|
||||
"safe-license-list": "^0.1.2",
|
||||
"sanitize-html": "^2.13.1",
|
||||
"shiki": "1.22.2",
|
||||
"silly-password-generator": "^1.0.28",
|
||||
"slashes": "^3.0.12",
|
||||
"spdx-satisfies": "^5.0.1",
|
||||
"sql-formatter": "^13.0.0",
|
||||
"stringify-object": "^5.0.0",
|
||||
"sshpk": "^1.18.0",
|
||||
"stringify-object": "^5.0.0",
|
||||
"svg2png-wasm": "^1.4.1",
|
||||
"svgo": "^3.3.2",
|
||||
"tesseract.js": "^5.1.1",
|
||||
@@ -228,8 +228,7 @@
|
||||
"unicode-emoji-json": "^0.4.0",
|
||||
"unplugin-auto-import": "^0.16.4",
|
||||
"utf8": "^3.0.0",
|
||||
"uuid": "^9.0.0",
|
||||
"uuidv7": "^1.0.0",
|
||||
"uuid": "^11.0.3",
|
||||
"vanilla-jsoneditor": "^0.23.8",
|
||||
"vue": "^3.3.4",
|
||||
"vue-color-wheel": "^0.1.1",
|
||||
@@ -285,9 +284,9 @@
|
||||
"@types/punycode": "^2.1.4",
|
||||
"@types/qrcode": "^1.5.0",
|
||||
"@types/sanitize-html": "^2.13.0",
|
||||
"@types/stringify-object": "^4.0.5",
|
||||
"@types/spdx-satisfies": "^0.1.2",
|
||||
"@types/sshpk": "^1.17.4",
|
||||
"@types/stringify-object": "^4.0.5",
|
||||
"@types/turndown": "^5.0.5",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"@types/utf8": "^3.0.3",
|
||||
|
||||
Generated
+906
-654
File diff suppressed because it is too large.
Load diff
@@ -1,12 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { v1 as generateUuidV1, v3 as generateUuidV3, v4 as generateUuidV4, v5 as generateUuidV5, NIL as nilUuid } from 'uuid';
|
||||
import { v1 as generateUuidV1, v3 as generateUuidV3, v4 as generateUuidV4, v5 as generateUuidV5, v6 as generateUuidV6, v7 as generateUuidV7, NIL as nilUuid } from 'uuid';
|
||||
|
||||
import { uuidv7 as generateUuidV7 } from 'uuidv7'; // 'uuid' package support for v7 is still in beta
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { computedRefreshable } from '@/composable/computedRefreshable';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
const versions = ['NIL', 'v1', 'v3', 'v4', 'v5', 'v7'] as const;
|
||||
const versions = ['NIL', 'v1', 'v3', 'v4', 'v5', 'v6', 'v7'] as const;
|
||||
|
||||
const version = useStorage<typeof versions[number]>('uuid-generator:version', 'v4');
|
||||
const count = useStorage('uuid-generator:quantity', 1);
|
||||
@@ -31,11 +30,12 @@ const generators = {
|
||||
clockseq: index,
|
||||
msecs: Date.now(),
|
||||
nsecs: Math.floor(Math.random() * 10000),
|
||||
node: Array.from({ length: 6 }, () => Math.floor(Math.random() * 256)),
|
||||
node: Uint8Array.from(Array.from({ length: 6 }, () => Math.floor(Math.random() * 256))),
|
||||
}),
|
||||
v3: () => generateUuidV3(v35Args.value.name, v35Args.value.namespace),
|
||||
v4: () => generateUuidV4(),
|
||||
v5: () => generateUuidV5(v35Args.value.name, v35Args.value.namespace),
|
||||
v6: () => generateUuidV6(),
|
||||
v7: () => generateUuidV7(),
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user