1.0.1 • Published 2 years ago
@miaooo/class-transformer-split v1.0.1
@miaooo/class-transformer-split
DEPRECATED
This package has been deprecated. Please use @buka/class-transformer-extra instead.
A class transformer helper that splits the string into multiple string.
Usage
// my-query.dto.ts
export MyQueryDTO {
  @ApiProperty({ type: 'string' })
  @Split(',')
  types: string[];
}// my.controller.ts
@Controller()
export class MyController {
  @Get("/")
  async get(@Query() filter: MyQueryDTO) {
    // query.types will be splited by ',' automated
    return query;
  }
}Contributing & Development
If there is any doubt, it is very welcome to discuss the issue together. Please read Contributor Covenant Code of Conduct and CONTRIBUTING.