brush picker!
This commit is contained in:
parent
9b82b211b4
commit
c1612b2a94
12 changed files with 849 additions and 45 deletions
9
static/random.js
Normal file
9
static/random.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue