UNPKG

@buka/class-transformer-extra

Version:

class-transformer-extra contains methods that's aren't included in the class-transform package.

7 lines (6 loc) 206 B
import { Transform } from 'class-transformer'; export function Trim() { return Transform(function TrimTransform({ value }) { return (typeof value === 'string' ? value.trim() : value); }); }