Files
Genarrative/src/services/typewriter.ts
高物 c49c64896a
Some checks failed
CI / verify (push) Has been cancelled
初始仓库迁移
2026-04-04 23:57:06 +08:00

7 lines
199 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}