aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/helpers/custom-validators/misc.ts
blob: b1291ba7a5b38a8f91a9e5a6f1d14c068d1731ee (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                              


                                              
                               




                                                                              



         








                                
function exists (value: any) {
  return value !== undefined && value !== null
}

function isArray (value: any) {
  return Array.isArray(value)
}

// ---------------------------------------------------------------------------

export {
  exists,
  isArray
}

declare global {
  namespace ExpressValidator {
    export interface Validator {
      exists,
      isArray
    }
  }
}