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

    Function internalize

    • Extracts a root-relative reference.

      • Hierarchical identifiers: Returns the root-relative path (starting with /) if scheme and authority match
      • Opaque identifiers: Returns the scheme-specific part if schemes match

      Type Parameters

      • T extends string

        The identifier type (URI or IRI)

      Parameters

      • base: string | T

        The absolute base identifier providing the scheme and authority context

      • reference: string | T

        The reference to internalize

      Returns T

      A root-relative reference if same origin, or the normalized absolute reference otherwise

      RangeError If the resolved path contains tree-climbing segments that would go above the root