1 import validator from 'validator'
2 import { isArray } from './misc'
4 function isNumberArray (value: any) {
5 return isArray(value) && value.every(v => validator.isInt('' + v))
8 function isStringArray (value: any) {
9 return isArray(value) && value.every(v => typeof v === 'string')
12 function isNSFWQueryValid (value: any) {
13 return value === 'true' || value === 'false' || value === 'both'
16 // ---------------------------------------------------------------------------