Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - 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>
25 lines
700 B
JavaScript
25 lines
700 B
JavaScript
import { SCALAR } from './identity.js';
|
|
import { NodeBase } from './Node.js';
|
|
import { toJS } from './toJS.js';
|
|
|
|
const isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');
|
|
class Scalar extends NodeBase {
|
|
constructor(value) {
|
|
super(SCALAR);
|
|
this.value = value;
|
|
}
|
|
toJSON(arg, ctx) {
|
|
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
}
|
|
toString() {
|
|
return String(this.value);
|
|
}
|
|
}
|
|
Scalar.BLOCK_FOLDED = 'BLOCK_FOLDED';
|
|
Scalar.BLOCK_LITERAL = 'BLOCK_LITERAL';
|
|
Scalar.PLAIN = 'PLAIN';
|
|
Scalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';
|
|
Scalar.QUOTE_SINGLE = 'QUOTE_SINGLE';
|
|
|
|
export { Scalar, isScalarValue };
|