Repository navigation
v8.3.0
Changes
- feat(serialization): ✨ Add toJSON to value objects
Release details
- npm: https://www.npmjs.com/package/@haskou/value-objects/v/8.3.0
- Pull request: #89
- Source branch:
feat/to-json - Version bump:
minor
Pull request notes
ValueObject.toJSON() returns the wrapped primitive, so JSON.stringify emits "a@b.co" instead of {"value":"a@b.co"}. Null objects throw NullObjectError from toJSON and toString. Includes tests and docs.