Files
controller-v2/client/src/pages/eq/peqPresetName.ts
T

14 lines
427 B
TypeScript
Raw Normal View History

2026-06-26 12:03:31 +08:00
import { PEQ_PRESET_NAME_MAX_LENGTH } from "./constants";
export function clampPeqPresetName(value: string): string {
return value.slice(0, PEQ_PRESET_NAME_MAX_LENGTH);
}
export function isPeqPresetNameTooLong(value: string): boolean {
return value.trim().length > PEQ_PRESET_NAME_MAX_LENGTH;
}
export function peqPresetNameLengthText(value: string): string {
return `${value.length}/${PEQ_PRESET_NAME_MAX_LENGTH}`;
}