@metreeca/wire
    Preparing search index...
    • Generates a datatype-annotated RDF literal.

      Emits the form "text"^^<datatype>, escaping text according to the STRING_LITERAL2 production and the datatype according to the IRIREF production; a missing or xsd:string datatype collapses to the string form.

      Parameters

      • text: string

        The lexical value of the literal

      • Optionaldatatype: string

        The IRI identifying the literal's datatype, or omitted for a plain xsd:string literal

      Returns string

      The generated literal, datatype-annotated unless the datatype is omitted or xsd:string

      RangeError if text is not a well-formed Unicode string, or if datatype is not a well-formed RFC 3987 reference, an isolated UTF-16 surrogate code point included