Overview
What this package owns in the runtime
Value objects gives xtaskjs projects a consistent way to model domain primitives and structured payload wrappers. It standardizes conversion from raw input, JSON strings, and serialized payloads while optionally bridging DTO transformation and DI-managed factory creation.
What it provides
- Base classes cover string, number, boolean, bigint, date, and JSON-backed value objects.
- Conversion helpers normalize raw values, JSON strings, and serialized payloads into predictable wrappers.
- TransformValueObject() plugs value objects into class-transformer DTO pipelines.
- createValueObjectFactory(), InjectableValueObjectFactory, and ValueObjectFactoryFor() support container-managed creation flows.
How it fits
- Fits naturally with @xtaskjs/common ValidationPipe once DTOs are transformed through class-transformer.
- Can register DI-friendly factories through @xtaskjs/core when value object creation belongs in services.
- Useful in HTTP DTOs, domain models, and persistence boundaries where primitive normalization must stay explicit.