1
0
Fork 0
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:
Chocobozzz 2021-03-11 10:55:09 +01:00
parent 5d43dae369
commit 829523cfa5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 19 additions and 23 deletions

View file

@ -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) {