2017-12-05 03:27:17 +00:00
|
|
|
/**
|
|
|
|
* 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})` : ''}`;
|
2017-12-05 03:27:17 +00:00
|
|
|
}
|