Increase possible chars in random

This commit is contained in:
Diego Mello 2023-02-23 09:53:23 -03:00
parent a1f8ef6c33
commit 0b9c325863
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
function random(length = 10) {
let text = '';
const possible = 'abcdefghijklmnopqrstuvwxyz';
const possible = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
for (let i = 0; i < length; i += 1) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}