Increase possible chars in random
This commit is contained in:
parent
a1f8ef6c33
commit
0b9c325863
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue