anzenjs
v1.3.3
Published
Joi-powered type-safe decorator library to ensure runtime type safe
Downloads
33
Readme
Anzenjs
Introduction
Anzenjs is type-safe decorator library that help to ensure type-safety in runtime for typescript project. At compile time, it guards user from wrongly decorated property in class. At run time, it uses joi
to validate input and transform it into correct decorated schema.
For examples please see the test directory. :)
Features
- TODO
TODO
- Add more tests.
- Investigate some way to support more fine-grained type (like Email, Phone ...). Some ideas: newtype-ts
- Maybe remove
joi
dependency from core library, so we can use it as a metadata library for other purpose?
Alternatives
There are some awesome libraries that solve the same problem domain:
- class-transform & class-validator: Does not support coerce values very well.
- joi & ajv: Javascript, non-type-safe library.