@metreeca/core - v0.9.18
    Preparing search index...

    Function asIRI

    • Creates a validated IRI from a string.

      Validates IRIs according to RFC 3987, allowing Unicode characters. For non-absolute variants, normalizes paths by removing . segments and resolving .. segments.

      Parameters

      • value: string

        The value to convert to an IRI

      • variant: Variant = "relative"

        The identifier variant to validate against (default: "relative")

      Returns string

      The validated and normalized IRI

      TypeError If the value is not a string

      RangeError If the value is not a valid IRI for the specified variant, or if .. segments would climb above the root