@rdfjs/wrapper
    Preparing search index...

    Function url

    • Maps a named node to a URL.

      Parameters

      Returns URL

      A URL that represents the IRI of the named node.

      Lexical values of named nodes can be illegal URLs because the rules for handling IRIs in RDF frameworks that implement RDF/JS can differ from the rules for handling URLs in JavaScript engines.

      The RDF

      BASE <http://example.com/>

      <s> <p> <o> .

      can be represented by the mapping

      class Class extends TermWrapper {
      public get property(): URL {
      return RequiredFrom.subjectPredicate(this, "http://example.com/p", NamedNodeAs.url)
      }
      }

      which returns the value http://example.com/o.

      ReferenceError If the term is undefined or null.

      TypeError If the term is not a TermWrapper.

      TermTypeError If the term is not a NamedNode

      TypeError If the value of the term cannot be parsed to a valid URL.