LDkit
    Preparing search index...

    Function OPTIONAL

    • SPARQL OPTIONAL expression fluent interface

      Parameters

      • strings: TemplateStringsArray
      • ...values: SparqlValue[]

      Returns Builders<"build">

      import { OPTIONAL } from "ldkit/sparql";

      const query = OPTIONAL`?s ?p ?o`.build();
      console.log(query); // OPTIONAL { ?s ?p ?o }