aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators/misc.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/custom-validators/misc.js')
-rw-r--r--server/helpers/custom-validators/misc.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/misc.js b/server/helpers/custom-validators/misc.js
new file mode 100644
index 000000000..782ae3dee
--- /dev/null
+++ b/server/helpers/custom-validators/misc.js
@@ -0,0 +1,18 @@
1'use strict'
2
3const miscValidators = {
4 exists: exists,
5 isArray: isArray
6}
7
8function exists (value) {
9 return value !== undefined && value !== null
10}
11
12function isArray (value) {
13 return Array.isArray(value)
14}
15
16// ---------------------------------------------------------------------------
17
18module.exports = miscValidators