• Merges the names using -> or OR depending on the mode.

    Wraps the names in parentheses if they contain an operator.

    Example

    mergeNames(["a", "b"], "-\>") === "a -\> b"
    

    Example

    mergeNames(["a", "b -\> c"], "||") === "a || (b -\> c)"
    

    Parameters

    • names: [string, string]

      A tuple of names to merge

    • operator: "->" | "|"

      The operator used for merging

    Returns string

    The merged names

Generated using TypeDoc