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>
8 lines
247 B
JavaScript
8 lines
247 B
JavaScript
import assertString from './util/assertString';
|
|
export default function toBoolean(str, strict) {
|
|
assertString(str);
|
|
if (strict) {
|
|
return str === '1' || /^true$/i.test(str);
|
|
}
|
|
return str !== '0' && !/^false$/i.test(str) && str !== '';
|
|
} |