mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Remove useless anonymous functions of files
This commit is contained in:
parent
d7c01e7793
commit
9f10b2928d
37 changed files with 3115 additions and 3189 deletions
|
@ -1,34 +1,32 @@
|
|||
;(function () {
|
||||
'use strict'
|
||||
'use strict'
|
||||
|
||||
var validator = require('validator')
|
||||
var validator = require('validator')
|
||||
|
||||
var customValidators = {
|
||||
eachIsRemoteVideosAddValid: eachIsRemoteVideosAddValid,
|
||||
eachIsRemoteVideosRemoveValid: eachIsRemoteVideosRemoveValid,
|
||||
isArray: isArray
|
||||
}
|
||||
var customValidators = {
|
||||
eachIsRemoteVideosAddValid: eachIsRemoteVideosAddValid,
|
||||
eachIsRemoteVideosRemoveValid: eachIsRemoteVideosRemoveValid,
|
||||
isArray: isArray
|
||||
}
|
||||
|
||||
function eachIsRemoteVideosAddValid (values) {
|
||||
return values.every(function (val) {
|
||||
return validator.isLength(val.name, 1, 50) &&
|
||||
validator.isLength(val.description, 1, 50) &&
|
||||
validator.isLength(val.magnetUri, 10) &&
|
||||
validator.isURL(val.podUrl)
|
||||
})
|
||||
}
|
||||
function eachIsRemoteVideosAddValid (values) {
|
||||
return values.every(function (val) {
|
||||
return validator.isLength(val.name, 1, 50) &&
|
||||
validator.isLength(val.description, 1, 50) &&
|
||||
validator.isLength(val.magnetUri, 10) &&
|
||||
validator.isURL(val.podUrl)
|
||||
})
|
||||
}
|
||||
|
||||
function eachIsRemoteVideosRemoveValid (values) {
|
||||
return values.every(function (val) {
|
||||
return validator.isLength(val.magnetUri, 10)
|
||||
})
|
||||
}
|
||||
function eachIsRemoteVideosRemoveValid (values) {
|
||||
return values.every(function (val) {
|
||||
return validator.isLength(val.magnetUri, 10)
|
||||
})
|
||||
}
|
||||
|
||||
function isArray (value) {
|
||||
return Array.isArray(value)
|
||||
}
|
||||
function isArray (value) {
|
||||
return Array.isArray(value)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
module.exports = customValidators
|
||||
})()
|
||||
module.exports = customValidators
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue