This commit is contained in:
syuilo 2023-10-04 11:32:33 +09:00
parent a40734d417
commit 610b68c8ff
3 changed files with 16 additions and 14 deletions

View file

@ -99,7 +99,7 @@ export const relativeFetch = async (path: string, init?: RequestInit | undefined
return await fetch(new URL(path, `http://127.0.0.1:${port}/`).toString(), init);
};
function randomString(chars = 'abcdefghijklmnopqrstuvwxyz0123456789', length = 16) {
export function randomString(chars = 'abcdefghijklmnopqrstuvwxyz0123456789', length = 16) {
let randomString = '';
for (let i = 0; i < length; i++) {
randomString += chars[Math.floor(Math.random() * chars.length)];