2017-09-07 13:27:35 +00:00
|
|
|
import 'express-validator'
|
|
|
|
|
2017-06-10 20:15:25 +00:00
|
|
|
function exists (value: any) {
|
2016-07-31 18:58:43 +00:00
|
|
|
return value !== undefined && value !== null
|
|
|
|
}
|
|
|
|
|
2017-06-10 20:15:25 +00:00
|
|
|
function isArray (value: any) {
|
2016-07-31 18:58:43 +00:00
|
|
|
return Array.isArray(value)
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
2017-05-15 20:22:03 +00:00
|
|
|
export {
|
|
|
|
exists,
|
|
|
|
isArray
|
|
|
|
}
|
2017-06-10 20:15:25 +00:00
|
|
|
|
2017-08-25 16:36:49 +00:00
|
|
|
declare module 'express-validator' {
|
|
|
|
export interface Validator {
|
|
|
|
exists,
|
|
|
|
isArray
|
2017-06-10 20:15:25 +00:00
|
|
|
}
|
|
|
|
}
|