選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

functions.js 416B

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. }