Server: reorganize express validators

This commit is contained in:
Chocobozzz 2016-07-31 20:58:43 +02:00
parent e62f6ef741
commit e4c556196d
8 changed files with 100 additions and 52 deletions

View file

@ -0,0 +1,18 @@
'use strict'
const miscValidators = {
exists: exists,
isArray: isArray
}
function exists (value) {
return value !== undefined && value !== null
}
function isArray (value) {
return Array.isArray(value)
}
// ---------------------------------------------------------------------------
module.exports = miscValidators