This commit is contained in:
Luiz Silva 2025-07-04 22:51:57 -03:00
parent aa7953e452
commit f8dabeb40c
75 changed files with 712 additions and 57 deletions

12
dist-import/uuid.js Normal file
View file

@ -0,0 +1,12 @@
//Gerar uma uuid V4
const letras = "0123456789abcdef".split("");
export const uuid = () => {
letras.sort(() => Math.random() - 0.5);
const modelo = "xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx".split("");
const retorno = modelo
.map((letra) => letra === "x"
? letras[((1000 * Math.random()) | 0) % letras.length]
: letra)
.join("");
return retorno;
};