]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/videos/uuid.ts
Move uuid stuff in extra utils
[github/Chocobozzz/PeerTube.git] / shared / core-utils / videos / uuid.ts
diff --git a/shared/core-utils/videos/uuid.ts b/shared/core-utils/videos/uuid.ts
deleted file mode 100644 (file)
index f3c80e0..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-import short, { uuid } from 'short-uuid'
-
-const translator = short()
-
-function buildUUID () {
-  return uuid()
-}
-
-function uuidToShort (uuid: string) {
-  if (!uuid) return uuid
-
-  return translator.fromUUID(uuid)
-}
-
-function shortToUUID (shortUUID: string) {
-  if (!shortUUID) return shortUUID
-
-  return translator.toUUID(shortUUID)
-}
-
-function isShortUUID (value: string) {
-  if (!value) return false
-
-  return value.length === translator.maxLength
-}
-
-export {
-  buildUUID,
-  uuidToShort,
-  shortToUUID,
-  isShortUUID
-}