Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 13 lines 337 B view raw
1const MIN_LENGTH = 25; 2const MAX_LENGTH = 160; 3 4const normalizeDescription = ( 5 text: string | null | undefined, 6 fallback: string 7): string => { 8 const trimmed = (text ?? "").trim(); 9 const base = trimmed.length >= MIN_LENGTH ? trimmed : fallback.trim(); 10 return base.slice(0, MAX_LENGTH); 11}; 12 13export default normalizeDescription;