refactor: rename drop functions for clarity and update tests

This commit is contained in:
fzzinchemical
2025-03-28 07:49:42 +01:00
parent 442dd6f4c6
commit d8be2c92f0
5 changed files with 146 additions and 98 deletions

View File

@@ -69,18 +69,18 @@ for (const k of baseResponse) {
hyperlinkarray.push(k.file_url);
}
export async function drop() {
export async function dropRule() {
if (hyperlinkarray.length === 0) {
await refresh();
return await drop();
return await dropRule();
}
return hyperlinkarray.pop()!;
}
export async function drop5() {
export async function dropRule5() {
let tmp = "";
for (let i = 0; i < 5; i++) {
tmp += await drop() + "\n";
tmp += await dropRule() + "\n";
}
return tmp;
}