dto-validator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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));
}

Package Sidebar

Install

npm i dto-validator

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

35.3 kB

Total Files

23

Last publish

Collaborators

  • m_kurkowski