UNPKG

@daysnap/utils

Version:
16 lines (10 loc) 440 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkXJIRG4ULcjs = require('./chunk-XJIRG4UL.cjs'); // src/getRandom.ts function getRandom(length, alphabet = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM") { return _chunkXJIRG4ULcjs.listGenerator.call(void 0, length, () => alphabet[Math.floor(Math.random() * alphabet.length)] ).join(""); } exports.getRandom = getRandom;