"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-7315/react/features/display-name/functions.ts" (2 Jun 2023, 406 Bytes) of package /linux/misc/jitsi-meet-7315.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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