mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
init create cli, added node and partially cloudflare
This commit is contained in:
14
app/src/cli/utils/cli.ts
Normal file
14
app/src/cli/utils/cli.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export async function wait(ms: number) {
|
||||
return new Promise((r) => setTimeout(r, ms));
|
||||
}
|
||||
|
||||
export async function* typewriter(
|
||||
text: string,
|
||||
delay: number,
|
||||
transform?: (char: string) => string
|
||||
) {
|
||||
for (const char of text) {
|
||||
yield transform ? transform(char) : char;
|
||||
await wait(delay);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user