Function validateUri

  • Checks that a string (or other input) is a valid KILT DID uri with or without a URI fragment. Throws otherwise.

    Parameters

    • input: unknown

      Arbitrary input.

    • Optional expectType: "Did" | "ResourceUri"

      ResourceUri if the URI is expected to have a fragment (following '#'), Did if it is expected not to have one. Default allows both.

    Returns void