ССОМ
This commit is contained in:
@ -750,4 +750,19 @@ exports.root = function (req) {
|
||||
exports.getInitials = function (names) {
|
||||
const parts = names.split(' ');
|
||||
return parts.map(part => part[0] + ".").join('');
|
||||
}
|
||||
}
|
||||
// exports.getInitials = function (names) {
|
||||
// const parts = names.split(' '); // Split the full name into parts
|
||||
// if (parts.length === 0) {
|
||||
// return '';
|
||||
// }
|
||||
// // Extract the first two letters of the first name
|
||||
// let initials = parts[0].substring(0, 2) + ".";
|
||||
|
||||
// // If there is a last name, add the first letter of the last name
|
||||
// if (parts.length > 1) {
|
||||
// initials += parts[parts.length - 1][0] + ".";
|
||||
// }
|
||||
|
||||
// return initials;
|
||||
// }
|
Reference in New Issue
Block a user