const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_";

export function randomId(length = 32) {
    let r = "";
    for (let i = 0; i < length; ++i) {
        r += charset.charAt(Math.floor(Math.random() * charset.length));
    }
    return r;
}
