1
0
Fork 0
peertube/shared/core-utils/common/number.ts
Chocobozzz 0c9668f779 Implement remote runner jobs in server
Move ffmpeg functions to @shared
2023-05-09 08:57:34 +02:00

13 lines
230 B
TypeScript

export function forceNumber (value: any) {
return parseInt(value + '')
}
export function isOdd (num: number) {
return (num % 2) !== 0
}
export function toEven (num: number) {
if (isOdd(num)) return num + 1
return num
}