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

    Function tagged

    • Creates an RDF language-tagged string.

      Pairs the validated lexical form with the validated BCP 47 tag identifying its natural language. The returned record is frozen.

      Both components are checked here rather than at serialisation: Tag is a documentation alias for string, so nothing in the type stops a caller from supplying a tag carrying grammar delimiters, and no RDF syntax defines an escape for a language tag, leaving a serialiser to render it verbatim into forged statements.

      Parameters

      • text: string

        The lexical form of the literal

      • language: string

        The BCP 47 language tag

      Returns Tagged

      A frozen Tagged record carrying the lexical form and the language tag

      RangeError if text is not a well-formed Unicode string, that is if it holds an isolated UTF-16 surrogate code point, or if language is not a well-formed BCP 47 language tag