7 lines
199 B
TypeScript
7 lines
199 B
TypeScript
export function getTypewriterDelay(char: string) {
|
||
if (/[。!??!]/u.test(char)) return 240;
|
||
if (/[,、;:,;:]/u.test(char)) return 150;
|
||
if (/\s/u.test(char)) return 45;
|
||
return 90;
|
||
}
|