0c9668f779
Move ffmpeg functions to @shared
13 lines
230 B
TypeScript
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
|
|
}
|