]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - server/helpers/custom-validators/misc.ts
Type functions
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / misc.ts
CommitLineData
69818c93 1function exists (value: any) {
e4c55619
C
2 return value !== undefined && value !== null
3}
4
69818c93 5function isArray (value: any) {
e4c55619
C
6 return Array.isArray(value)
7}
8
9// ---------------------------------------------------------------------------
10
65fcc311
C
11export {
12 exists,
13 isArray
14}
69818c93
C
15
16declare global {
17 namespace ExpressValidator {
18 export interface Validator {
19 exists,
20 isArray
21 }
22 }
23}