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>
31 lines
589 B
JavaScript
Executable File
31 lines
589 B
JavaScript
Executable File
'use strict';
|
|
|
|
const AssertError = require('./assertError');
|
|
const Stringify = require('./stringify');
|
|
|
|
|
|
const internals = {};
|
|
|
|
|
|
const assert = module.exports = function (condition, ...args) {
|
|
|
|
if (condition) {
|
|
return;
|
|
}
|
|
|
|
if (args.length === 1 &&
|
|
args[0] instanceof Error) {
|
|
|
|
throw args[0];
|
|
}
|
|
|
|
const msgs = args
|
|
.filter((arg) => arg !== '')
|
|
.map((arg) => {
|
|
|
|
return typeof arg === 'string' ? arg : arg instanceof Error ? arg.message : Stringify(arg);
|
|
});
|
|
|
|
throw new AssertError(msgs.join(' '), assert);
|
|
};
|