Files
memecoin-botV2/.pnpm-store/v10/files/06/26312584a22e9f5831d4221112a5d30fc6528f13e1a76a33b3ae7ad037ff73d9709d35b3668c29af8cb1eb4a841694323c838f60276ad86407aca7c3274c12

25 lines
518 B
Plaintext

let urlAlphabet =
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
let customAlphabet = (alphabet, defaultSize = 21) => {
return (size = defaultSize) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += alphabet[(Math.random() * alphabet.length) | 0]
}
return id
}
}
let nanoid = (size = 21) => {
let id = ''
let i = size | 0
while (i-- > 0) {
id += urlAlphabet[(Math.random() * 64) | 0]
}
return id
}
module.exports = { nanoid, customAlphabet }