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

14 lines
415 B
JavaScript
Raw Normal View History

// @flow
/**
* 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: string, suffix: string = '') {
return `${displayName || suffix}${
2019-01-13 19:33:28 +00:00
displayName && suffix && displayName !== suffix ? ` (${suffix})` : ''}`;
}