@grafctory/trio - v0.4.0
    Preparing search index...

    Function decodeNTriples

    • Decodes an N-Triples document into its RDF graph.

      Blank-node labels are not preserved: each distinct label is renumbered with a short sequential id.

      Warning

      A blank-node label carrying : is rejected as malformed, although N-Triples admits it: labels are read against the intersection of the N-Triples, Turtle and SPARQL 1.1 grammars, as the blank factory is.

      Parameters

      • value: string

        The N-Triples document to decode

      Returns Graph

      The decoded graph

      SyntaxError if any non-empty, non-comment line is not a well-formed N-Triples triple, or if a UCHAR escape within an IRI or a literal lexical form expands to an isolated UTF-16 surrogate code point

      RangeError if a component the document syntax admits is rejected by the data model factory building it: a relative IRI, or a language tag outside the BCP 47 syntax the wider N-Triples LANGTAG production allows