import { Transform } from 'class-transformer';

export function TransformNullOrUndefinedIntoEmptyArray(): PropertyDecorator {
  return Transform(({ value }) => {
    if (!value) return [];

    return value;
  });
}
