Random

// with random
btoa(Math.random())
// with crypto
btoa(crypto.getRandomValues(new Uint8Array(16)))
// base64 has `=` remove them
btoa(Math.random()).replace(/=/g, "")
// lower case
btoa(Math.random()).toLowerCase()
// align length
btoa(Math.random()).substring(0, 10)
// letter only
btoa(crypto.getRandomValues(new Uint8Array(16))).replace(/[0-9]/g, "").replace(/=/g, "")
// number only
crypto.getRandomValues(new Uint8Array(16)).join("")