mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2025-12-06 13:54:07 +00:00
8 lines
228 B
TypeScript
8 lines
228 B
TypeScript
const sleep = (ms: number): Promise<unknown> =>
|
|
new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
|
const randomBool = (chance_of_failure = 0.25): boolean =>
|
|
Math.random() < chance_of_failure;
|
|
|
|
export { sleep, randomBool };
|