1 import * as validator from 'validator'
2 import 'express-validator'
4 import { isArray } from './misc'
6 function isNumberArray (value: any) {
7 return isArray(value) && value.every(v => validator.isInt('' + v))
10 function isStringArray (value: any) {
11 return isArray(value) && value.every(v => typeof v === 'string')
14 function isNSFWQueryValid (value: any) {
15 return value === 'true' || value === 'false' || value === 'both'
18 // ---------------------------------------------------------------------------