_comuns/dist/aleatorio.js
2024-05-07 10:50:06 -03:00

7 lines
No EOL
385 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aleatorio = void 0;
const alfabeto = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
const aleatorio = (tamanho) => Array.from({ length: tamanho || 8 }, () => `ale-${alfabeto[Math.floor(Math.random() * 1000) % alfabeto.length]}`).join("");
exports.aleatorio = aleatorio;
//# sourceMappingURL=aleatorio.js.map