2.0.0 • Published 2 months ago

@dbc-tech/http-kit v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

2 months ago

1.4.6

10 months ago

1.4.5

10 months ago

1.4.9

10 months ago

1.4.8

10 months ago

1.4.7

10 months ago

1.4.4

10 months ago

1.4.3

10 months ago

1.4.2

10 months ago

1.4.1

10 months ago

1.4.0

10 months ago

1.3.0

10 months ago

1.2.0

11 months ago

1.2.2

10 months ago

1.2.1

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago