jiti-meet/react/features/display-name/functions.js

12 lines
390 B
JavaScript
Raw Normal View History

/**
* Appends a suffix to the display name.
*
* @param {string} displayName - The display name.
* @param {string} suffix - Suffix that will be appended.
* @returns {string} The formatted display name.
*/
export function appendSuffix(displayName, suffix) {
return `${displayName || suffix || ''}${
2019-01-13 19:33:28 +00:00
displayName && suffix && displayName !== suffix ? ` (${suffix})` : ''}`;
}