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

Search channels against handles and not names

This commit is contained in:
Chocobozzz 2021-07-29 10:27:24 +02:00
parent fbd67e7f38
commit b033851fb5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
17 changed files with 87 additions and 34 deletions

View file

@ -23,6 +23,10 @@ function isNotEmptyIntArray (value: any) {
return Array.isArray(value) && value.every(v => validator.isInt('' + v)) && value.length !== 0
}
function isNotEmptyStringArray (value: any) {
return Array.isArray(value) && value.every(v => typeof v === 'string' && v.length !== 0) && value.length !== 0
}
function isArrayOf (value: any, validator: (value: any) => boolean) {
return isArray(value) && value.every(v => validator(v))
}
@ -187,6 +191,7 @@ export {
isIntOrNull,
isIdValid,
isSafePath,
isNotEmptyStringArray,
isUUIDValid,
toCompleteUUIDs,
toCompleteUUID,