Skip to content

Trim

@tsed/mongoose

Usage

typescript
import { Trim } from "@tsed/mongoose";

See /packages/orm/mongoose/src/types/decorators/trim.ts.

Overview

ts
function Trim(): Function;

Description

Tell Mongoose to make the property trimmable.

Example

typescript
@Model()
export class EventModel {
  @Trim()
  name: string;
}

Released under the MIT License.