mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Reduce bundle size using a const enum
This commit is contained in:
parent
5d43dae369
commit
829523cfa5
4 changed files with 19 additions and 23 deletions
|
@ -1,10 +1,9 @@
|
|||
import { exists } from './misc'
|
||||
import validator from 'validator'
|
||||
import { UserNotificationType } from '../../../shared/models/users'
|
||||
import { UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
|
||||
import { exists } from './misc'
|
||||
|
||||
function isUserNotificationTypeValid (value: any) {
|
||||
return exists(value) && validator.isInt('' + value) && UserNotificationType[value] !== undefined
|
||||
return exists(value) && validator.isInt('' + value)
|
||||
}
|
||||
|
||||
function isUserNotificationSettingValid (value: any) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue