@grafctory/blue - v0.17.0
    Preparing search index...

    Function iri

    • Creates a shape for Internationalized Resource Identifier values.

      Fixes the datatype to xsd:string. IRIs generalise URIs (RFC 3986) and URLs by admitting the full Unicode character set beyond ASCII; the variant states which subset of the IRI hierarchy is accepted: browsable (HTTP and HTTPS links a browser can open), hierarchical (a scheme followed by an absolute path, with or without authority), absolute (scheme-based URIs/IRIs), internal (absolute or root-relative), or relative (any valid reference, including relative paths such as ../path or path; the default).

      As a limitation, variants are told apart by their prefix rather than parsed against the full RFC 3987 grammar: the scheme, the leading slashes and, for browsable, the presence of a host. relative admits any whitespace-free sequence, and the stricter variants leave the rest of the reference unvalidated.

      Type Parameters

      Parameters

      Returns StringShape<{ inferred from <C> }>

      An immutable shape admitting IRIs of the stated variant, narrowed to the values the constraints enumerate

      TraceError Where the stated constraints contradict one another