GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing ldkit.io — LDkit · Linked Data query toolkit for TypeScript developers LDkitLinked Data query toolkit 1. Create data schemaSpecify entities to retrieve and their properties. Various data types, optional properties, arrays and language annotated literals are supported. import { dbo, rdfs, xsd } from "ldkit/namespaces"; const PersonSchema = { "@type": dbo.Person, name: rdfs.label, abstract: dbo.abstract, birthDate: { "@id": dbo.birthDate, "@type": xsd.date, }, } as const; 2. Set up data sourceUse a SPARQL query endpoint, or any other RDF data source. import { type Options, setGlobalOptions } from "ldkit"; const options = { sources: ["https://dbpedia.org/sparql"], } satisfies Options; setGlobalOptions(options); 3. Fetch data!Convert data Schema to a Lens and fetch data with one line of code. Data gets transformed from RDF to native TypeScript automatically. import { createLens } from "ldkit"; const Persons = createLens(PersonSchema); const adaIri = "http://dbpedia.org/resource/Ada_Lovelace"; const ada = await Persons.findByIri(adaIri); console.log(ada.name); // Ada Lovelace console.log(ada.birthDate); // Date object of 1815-12-10 Next-gen RDF abstractionQuery RDF data from any source effortlessly. First class TypeScriptBest in class developer experience. Fully typed workflow. Deploy anywhereLDkit runs in browser, Deno and Node. RDF/JS compliantCompatible or built upon all the popular RDF/JS libraries |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |