aboutsummaryrefslogtreecommitdiff
path: root/api/util.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-15 15:14:44 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-15 15:14:44 +0200
commitcc53f217f6122151bcae131a42da8f8887f8560d (patch)
tree2d09b9fd3758cecc00626c8aac31510dee7a37af /api/util.py
parentc5f71bc38772dedb033258416e0cd722f7b9e7af (diff)
new valid and util module, more function decorators
Diffstat (limited to 'api/util.py')
-rw-r--r--api/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/util.py b/api/util.py
new file mode 100644
index 0000000..777820a
--- /dev/null
+++ b/api/util.py
@@ -0,0 +1,6 @@
+def all_def(props):
+ return all(bool(v) for v in props)
+
+
+def all_notdef(props):
+ return all(not v for v in props)