$titlecase
Update records by converting a string column to title case format. The $titlecase method is used to modify text fields by capitalizing the first letter of each word in a string, while keeping the rest of the letters in lowercase (e.g., “Hello World”). This is useful for formatting titles, headings, or names where title case is preferred.
await Member.$update({
$where: {
age: {
$eq: 16
}
},
$update: {
$titlecase: {
username: true
}
}
});
Last updated