Skip to main content

NamingConventions

Call namingConventions() and pass in a NamingConventionInput to customize the Mapping's NamingConvention

export type NamingConventionInput =
| NamingConvention
| {
source: NamingConvention;
destination: NamingConvention;
};
createMap(
mapper,
User,
UserDto,
namingConventions(new CamelCaseNamingConvention())
);

createMap(
mapper,
Product,
ProductDto,
namingConventions({
source: new SnakeCaseNamingConvention(),
destination: new CamelCaseNamingConvention(),
})
);