PeerTube/server/helpers/custom-validators/misc.ts

17 lines
285 B
TypeScript
Raw Normal View History

2017-09-07 15:27:35 +02:00
import 'express-validator'
2017-06-10 22:15:25 +02:00
function exists (value: any) {
2016-07-31 20:58:43 +02:00
return value !== undefined && value !== null
}
2017-06-10 22:15:25 +02:00
function isArray (value: any) {
2016-07-31 20:58:43 +02:00
return Array.isArray(value)
}
// ---------------------------------------------------------------------------
2017-05-15 22:22:03 +02:00
export {
exists,
isArray
}