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

Check live duration and size

This commit is contained in:
Chocobozzz 2020-09-25 16:19:35 +02:00 committed by Chocobozzz
parent a5cf76afa3
commit fb7194043d
27 changed files with 436 additions and 168 deletions

View file

@ -45,6 +45,10 @@ function isBooleanValid (value: any) {
return typeof value === 'boolean' || (typeof value === 'string' && validator.isBoolean(value))
}
function isIntOrNull (value: any) {
return value === null || validator.isInt('' + value)
}
function toIntOrNull (value: string) {
const v = toValueOrNull(value)
@ -116,6 +120,7 @@ export {
isArrayOf,
isNotEmptyIntArray,
isArray,
isIntOrNull,
isIdValid,
isSafePath,
isUUIDValid,