mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 06:04:05 +00:00
improved API request wrapper, partial completion of operations
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
export const sleep = (ms: number): Promise<unknown> =>
|
||||
const sleep = (ms: number): Promise<unknown> =>
|
||||
new Promise((resolve) => setTimeout(resolve, ms));
|
||||
|
||||
export const randomBool = (chance_of_failure = 0.25): boolean =>
|
||||
const randomBool = (chance_of_failure = 0.25): boolean =>
|
||||
Math.random() < chance_of_failure;
|
||||
|
||||
export { sleep, randomBool };
|
||||
|
||||
Reference in New Issue
Block a user