mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Prefer using Object.values
This commit is contained in:
parent
bbd5aa7ead
commit
690bb8f9f3
17 changed files with 48 additions and 48 deletions
|
@ -1,4 +1,3 @@
|
|||
import { values } from 'lodash'
|
||||
import validator from 'validator'
|
||||
import { UserRole } from '@shared/models'
|
||||
import { isEmailEnabled } from '../../initializers/config'
|
||||
|
@ -44,9 +43,9 @@ function isUserEmailVerifiedValid (value: any) {
|
|||
return isBooleanValid(value)
|
||||
}
|
||||
|
||||
const nsfwPolicies = values(NSFW_POLICY_TYPES)
|
||||
const nsfwPolicies = new Set(Object.values(NSFW_POLICY_TYPES))
|
||||
function isUserNSFWPolicyValid (value: any) {
|
||||
return exists(value) && nsfwPolicies.includes(value)
|
||||
return exists(value) && nsfwPolicies.has(value)
|
||||
}
|
||||
|
||||
function isUserP2PEnabledValid (value: any) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue