aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-17 13:58:07 +0100
committerChocobozzz <me@florianbigard.com>2021-12-17 13:58:07 +0100
commitf304a1580b5ce7b6c5f9e25cd3ddc63ca8d8c6a1 (patch)
tree5d2b8e1c0e3ec05ad3e18cb59fe9ad84fac710eb /shared
parentc55e3d7227fe1453869e309025996b9d75256d5d (diff)
downloadPeerTube-f304a1580b5ce7b6c5f9e25cd3ddc63ca8d8c6a1.tar.gz
PeerTube-f304a1580b5ce7b6c5f9e25cd3ddc63ca8d8c6a1.tar.zst
PeerTube-f304a1580b5ce7b6c5f9e25cd3ddc63ca8d8c6a1.zip
Fix build
Diffstat (limited to 'shared')
-rw-r--r--shared/core-utils/common/index.ts2
-rw-r--r--shared/core-utils/common/random.ts8
-rw-r--r--shared/extra-utils/crypto.ts (renamed from shared/core-utils/common/crypto.ts)0
-rw-r--r--shared/extra-utils/index.ts1
4 files changed, 10 insertions, 1 deletions
diff --git a/shared/core-utils/common/index.ts b/shared/core-utils/common/index.ts
index f9ba10d5e..720977ead 100644
--- a/shared/core-utils/common/index.ts
+++ b/shared/core-utils/common/index.ts
@@ -1,5 +1,5 @@
1export * from './array' 1export * from './array'
2export * from './crypto' 2export * from './random'
3export * from './date' 3export * from './date'
4export * from './env' 4export * from './env'
5export * from './object' 5export * from './object'
diff --git a/shared/core-utils/common/random.ts b/shared/core-utils/common/random.ts
new file mode 100644
index 000000000..705735d09
--- /dev/null
+++ b/shared/core-utils/common/random.ts
@@ -0,0 +1,8 @@
1// high excluded
2function randomInt (low: number, high: number) {
3 return Math.floor(Math.random() * (high - low) + low)
4}
5
6export {
7 randomInt
8}
diff --git a/shared/core-utils/common/crypto.ts b/shared/extra-utils/crypto.ts
index 1a583f1a0..1a583f1a0 100644
--- a/shared/core-utils/common/crypto.ts
+++ b/shared/extra-utils/crypto.ts
diff --git a/shared/extra-utils/index.ts b/shared/extra-utils/index.ts
index 38303cf1f..373d27cb4 100644
--- a/shared/extra-utils/index.ts
+++ b/shared/extra-utils/index.ts
@@ -1,2 +1,3 @@
1export * from './crypto'
1export * from './ffprobe' 2export * from './ffprobe'
2export * from './file' 3export * from './file'