Files
2026-03-04 16:26:32 -05:00

19 lines
528 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UniqueId = void 0;
const crypto_1 = require("crypto");
class UniqueId {
constructor(value) {
this.value = value;
}
static create() { return new UniqueId((0, crypto_1.randomUUID)()); }
static from(value) { return new UniqueId(value); }
toString() { return this.value; }
equals(other) {
if (!other)
return false;
return this.value === other.value;
}
}
exports.UniqueId = UniqueId;