mirror of
https://github.com/SwissFederalArchives/lindas-clownface.git
synced 2026-08-26 12:44:24 +00:00
Read-only mirror of https://github.com/SwissFederalArchives/lindas-clownface — Schweizerisches Bundesarchiv. Issues & pull requests at the source.
- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Add permissions for contents and pull-requests - Configure npm registry URL in setup-node - Add NODE_AUTH_TOKEN environment variable for npm authentication |
||
| .changeset | ||
| .claude | ||
| .github/workflows | ||
| docs | ||
| examples | ||
| lib | ||
| Removed | ||
| test | ||
| .eslintrc.json | ||
| .gitignore | ||
| CHANGELOG.md | ||
| codecov.yml | ||
| Factory.js | ||
| filter.js | ||
| index.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
lindas-clownface
Clownface is a graph traversal library inspired by Gremlin which allows to query any RDF dataset in a concise and readable way.
Clownface greatly simplifies interacting with RDF data in JavaScript.
Quick start
The recommended way is to use clownface with and RDF/JS environment.
It also requires DataFactory and DatasetFactory, for example those provided by @rdfjs/data-model and @rdfjs/dataset packages respectively, as well as @rdfjs/namespace.
npm install lindas-clownface @rdfjs/environment @rdfjs/data-model @rdfjs/dataset @rdfjs/namespace
import Environment from '@rdfjs/environment/Environment.js'
import NamespaceFactory from '@rdfjs/namespace/Factory.js'
import DatasetFactory from '@rdfjs/dataset/Factory.js'
import DataFactory from '@rdfjs/data-model/Factory.js'
import ClownfaceFactory from 'lindas-clownface/Factory.js'
const $rdf = new Environment([
NamespaceFactory,
DatasetFactory,
DataFactory,
ClownfaceFactory
])
const graph = $rdf.clownface()
Alternatively, if you already use @zazuko/env, it comes bundled with clownface and its dependencies.
import $rdf from '@zazuko/env'
const graph = $rdf.clownface()
Learn more
If you are new to RDF and JavaScript, consider our Getting Started guide that also covers Clownface basics.
For API documentation and examples, see https://swissfederalarchives.github.io/lindas-clownface/.