1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add videos list filters

This commit is contained in:
Chocobozzz 2018-07-20 14:35:18 +02:00
parent 57c36b277e
commit d525fc399a
26 changed files with 835 additions and 271 deletions

View file

@ -0,0 +1,19 @@
import * as validator from 'validator'
import 'express-validator'
import { isArray } from './misc'
function isNumberArray (value: any) {
return isArray(value) && value.every(v => validator.isInt('' + v))
}
function isStringArray (value: any) {
return isArray(value) && value.every(v => typeof v === 'string')
}
// ---------------------------------------------------------------------------
export {
isNumberArray,
isStringArray
}