ldc-cocotte/resources/ts/modules/uniqueid.ts

6 lines
179 B
TypeScript
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
export function uniqueId() {
const timestamp = Date.now().toString(36);
const randomPart = Math.random().toString(36).substring(2, 9);
return `${timestamp}${randomPart}`;
}