aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/local-storage-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-15 15:58:10 +0100
committerChocobozzz <me@florianbigard.com>2021-12-16 10:08:55 +0100
commita9bfa85d2cdf13670aaced740da5b493fbeddfce (patch)
tree3781c9218d4cc7786b6589365c0efbed2151703d /client/src/root-helpers/local-storage-utils.ts
parentc77fdc605b3ccc1ab6890f889d8200fbe9372949 (diff)
downloadPeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.gz
PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.zst
PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.zip
Add ability for admins to set default p2p policy
Diffstat (limited to 'client/src/root-helpers/local-storage-utils.ts')
-rw-r--r--client/src/root-helpers/local-storage-utils.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/root-helpers/local-storage-utils.ts b/client/src/root-helpers/local-storage-utils.ts
new file mode 100644
index 000000000..c2b3f9035
--- /dev/null
+++ b/client/src/root-helpers/local-storage-utils.ts
@@ -0,0 +1,10 @@
1function getBoolOrDefault (value: string, defaultValue: boolean) {
2 if (value === 'true') return true
3 if (value === 'false') return false
4
5 return defaultValue
6}
7
8export {
9 getBoolOrDefault
10}