This commit is contained in:
Luiz H. R. Silva 2024-06-02 16:20:44 -03:00
parent 141cc98532
commit 0482d3c102
4 changed files with 8 additions and 7 deletions

4
dist/aleatorio.js vendored
View file

@ -2,6 +2,8 @@
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("");
const aleatorio = (tamanho) => `eli-${Array.from({ length: tamanho || 8 })
.map(() => alfabeto[((999 * Math.random()) | 0) % alfabeto.length])
.join("")}`;
exports.aleatorio = aleatorio;
//# sourceMappingURL=aleatorio.js.map