dto-validator
v1.0.0
Published
custom rxjs pipe responsible for creation and validation objects
Downloads
9
Maintainers
Readme
DTO Validator
Simple rxjs custom pipe responsible for:
- object creation based on class-transformer library
- DTO validation
USE EXAMPLE
import { ggpDTO } from 'dto-validator';
getAnimals(): Observable<Animals.AnimalDTO> {
return this.http
.get<Array<Animals.AnimalDTO>>('http://localhost:3000/dogs')
.pipe(ggpDTO(Animals.AnimalDTO));
}