Files
STTracker/packages/db/src/ids.ts
T

10 lines
272 B
TypeScript

/** Time-sortable UUIDv7, generated in app code. */
export function newId(): string {
return Bun.randomUUIDv7();
}
/** Current time as an ISO-8601 UTC string, the storage format for timestamps. */
export function nowIso(): string {
return new Date().toISOString();
}