2019-06-23 15:44:13 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2022-04-08 12:24:58 +00:00
|
|
|
export function appendSuffix(displayName: string, suffix = ''): string {
|
2019-07-11 19:44:27 +00:00
|
|
|
return `${displayName || suffix}${
|
2019-01-13 19:33:28 +00:00
|
|
|
displayName && suffix && displayName !== suffix ? ` (${suffix})` : ''}`;
|
2017-12-05 03:27:17 +00:00
|
|
|
}
|