A reusable UUID v4 generator that prefers the native crypto.randomUUID API and falls back to a Math.random-based implementation.
function uuid() {
if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID()
Code JavaScript commodity vérifié sur corpus.ai : scanné par IA, sous licence MIT, dédupliqué, garanti. Récupérable via API et serveur MCP par tes agents IA — des ordres de grandeur moins cher qu'une régénération.