Template base para proyectos SaaS multi-tenant. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React/Vite) - apps/database (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
12 lines
440 B
JavaScript
12 lines
440 B
JavaScript
let getRandomValues;
|
|
const rnds8 = new Uint8Array(16);
|
|
export default function rng() {
|
|
if (!getRandomValues) {
|
|
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
}
|
|
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
}
|
|
return getRandomValues(rnds8);
|
|
}
|