@metreeca/trio - v0.1.1
    Preparing search index...

    Function typed

    • Creates an RDF typed literal.

      Pairs the validated lexical form with the validated IRI of its XSD (or user-defined) datatype, defaulting to the xsd:string IRI RDF 1.1 reads into an unannotated literal. A non-string scalar is coerced to its lexical form via String(), and the coerced form is what gets validated. The returned record is frozen.

      Parameters

      • text: Scalar

        The lexical form of the literal, as a Scalar coerced to a string via String()

      • datatype: string = xsd.string

        The IRI of the literal datatype; defaults to xsd:string

      Returns Typed

      A frozen Typed record carrying the lexical form and the datatype

      RangeError if the coerced text is not a well-formed Unicode string, that is if it holds an isolated UTF-16 surrogate code point, or if datatype is a relative or otherwise malformed IRI