build
This commit is contained in:
parent
e6fa9640bc
commit
24407479cf
31 changed files with 1759 additions and 10 deletions
51
dist-back/uuid.js
Normal file
51
dist-back/uuid.js
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var uuid_exports = {};
|
||||
__export(uuid_exports, {
|
||||
erUuid: () => erUuid,
|
||||
uuid: () => uuid,
|
||||
uuidV3: () => uuidV3,
|
||||
uuidV4: () => uuidV4,
|
||||
validarUuid: () => validarUuid
|
||||
});
|
||||
module.exports = __toCommonJS(uuid_exports);
|
||||
var import_uuid = require("uuid");
|
||||
const erUuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
||||
const validarUuid = (uuid2) => {
|
||||
const retorno = erUuid.test(String(uuid2 || ""));
|
||||
return retorno;
|
||||
};
|
||||
const uuidV3 = (chave, grupo) => {
|
||||
return (0, import_uuid.v3)(
|
||||
// Converte a chave para string (de forma segura)
|
||||
typeof chave === "string" ? chave : typeof chave === "number" ? String(chave) : JSON.stringify(chave),
|
||||
// Se um grupo foi fornecido, gera um UUID v3 recursivamente com base nele, senão usa NIL
|
||||
grupo ? uuidV3(grupo) : import_uuid.NIL
|
||||
);
|
||||
};
|
||||
const uuidV4 = import_uuid.v4;
|
||||
const uuid = uuidV4;
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
erUuid,
|
||||
uuid,
|
||||
uuidV3,
|
||||
uuidV4,
|
||||
validarUuid
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue