refactor: rename drop functions for clarity and update tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user