• Possibly formats a new link if the given link is either a CoreMedia Unified API (UAPI) Content or Content Blob Identifier. Otherwise, returns the given string unmodified.

    Parameters

    • href: string

      link href to possibly adjust

    Returns string

    the original href or in case of UAPI references, references suitable for use in Studio Client.

    Example

    formatLink("https://example.org")
    => "https://example.org"

    Example

    formatLink("content/2")
    => "content/2"

    Example

    formatLink("coremedia:///cap/content/2")
    => "content/2"

    Example

    formatLink("content/2#properties.data")
    => "content/2#properties.data"

    Example

    formatLink("coremedia:///cap/blob/content/2#data")
    => "content/2#properties.data"