UNPKG

@buka/class-transformer-extra

Version:

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

8 lines (7 loc) 246 B
import { Transform } from 'class-transformer'; import { uniq } from 'ramda'; export function Uniq(options) { return Transform(function UniqTransform({ value }) { return (Array.isArray(value) ? uniq(value) : value); }, options); }