2.0.0 • Published 1 year ago
@dbc-tech/http-kit v2.0.0
http-kit
A Node.js package for managing HTTP client requests
Install
npm install @dbc-tech/http-kit
Utilities
plainToDto
This method converts a plain object to a DTO object using the provided DTO class. If the DTO class is not provided, it return the plain object as is:
import { Type } from 'class-transformer';
import { plainToDto } from './plain-to-dto';
class Dto {
id: number;
name: string;
@Type(() => Date)
createdAt: Date;
@Type(() => Date)
updatedAt: Date;
@Type(() => Hit)
hits: Hit[];
}
const dto = plainToDto(plain, Dto);
2.0.0
1 year ago
1.4.6
2 years ago
1.4.5
2 years ago
1.4.9
2 years ago
1.4.8
2 years ago
1.4.7
2 years ago
1.4.4
2 years ago
1.4.3
2 years ago
1.4.2
2 years ago
1.4.1
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
1.2.0
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago