Metreeca Wire
    Preparing search index...
    • Generates the SPARQL IRIREF for an IRI.

      Renders the supplied IRI into an angle-bracketed IRIREF, escaping supplementary code points as UCHAR sequences. With no argument, mints a fresh opaque urn:uuid: IRI, useful for one-shot anonymous resource anchors in generated SPARQL.

      The IRI is validated as an RFC 3987 reference, absolute or relative, and never resolved: a relative IRI is accepted and rendered as supplied, unlike the named term constructor of @metreeca/trio, which admits only absolute ones.

      Parameters

      • Optionaliri: string

        The IRI to render, or omitted to mint a fresh urn:uuid: IRI

      Returns string

      The generated IRIREF

      RangeError if iri is not a well-formed RFC 3987 reference, an isolated UTF-16 surrogate code point included