An open API service indexing awesome lists of open source software.

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

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/