You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 415B

12345678910111213
  1. // @flow
  2. /**
  3. * Appends a suffix to the display name.
  4. *
  5. * @param {string} displayName - The display name.
  6. * @param {string} suffix - Suffix that will be appended.
  7. * @returns {string} The formatted display name.
  8. */
  9. export function appendSuffix(displayName: string, suffix: string = '') {
  10. return `${displayName || suffix}${
  11. displayName && suffix && displayName !== suffix ? ` (${suffix})` : ''}`;
  12. }