https://github.com/laurence-myers/lynx-mapper
Type-Safe complete mapping for plain old JavaScript objects using function-defined "schema" objects
https://github.com/laurence-myers/lynx-mapper
object-mapper type-safety typescript
Last synced: 19 days ago
JSON representation
Type-Safe complete mapping for plain old JavaScript objects using function-defined "schema" objects
- Host: GitHub
- URL: https://github.com/laurence-myers/lynx-mapper
- Owner: laurence-myers
- License: mit
- Created: 2024-10-26T09:23:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-02T03:53:32.000Z (over 1 year ago)
- Last Synced: 2025-02-02T04:24:26.976Z (over 1 year ago)
- Topics: object-mapper, type-safety, typescript
- Language: TypeScript
- Homepage: https://laurence-myers.github.io/lynx-mapper/
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lynx Mapper
Type-safe, "exhaustive" object mapping, for TypeScript.
You define an "object mapper schema", per some combination of input and output
types, with one mapper function per property on the output type.
You can reuse some (or all) of your mapper functions between schemas, allowing
you to easily compose object mapper schemas.
The main class is `ObjectMapper`. There is also an async version,
`AsyncObjectMapper`.
Use this instead of plain functions (which can miss optional properties), or
classes.
## Docs
https://laurence-myers.github.io/lynx-mapper/