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

    Function getNamespaceBase

    • Retrieves the base identifier of a namespace.

      Extracts the scheme and authority components of the namespace IRI, as reported by getIRIBase, providing an identifier suitable for resolving references against the IRIs minted by the namespace.

      Parameters

      • namespace: { "": string; readonly [term: string]: string }

        The namespace to retrieve the base identifier from

      Returns string | undefined

      The base identifier of the IRI of namespace, terminated by a trailing slash, or undefined if the namespace IRI is opaque, that is not a hierarchical identifier (for example, urn:example:)

      getNamespaceBase(app);                              // "app:/"
      getNamespaceBase(createNamespace("urn:example:")); // undefined