@daysnap/utils
Version:
16 lines (13 loc) • 323 B
JavaScript
import {
listGenerator
} from "./chunk-2SUOLGG5.js";
// src/getRandom.ts
function getRandom(length, alphabet = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM") {
return listGenerator(
length,
() => alphabet[Math.floor(Math.random() * alphabet.length)]
).join("");
}
export {
getRandom
};