https://github.com/zazuko/clownface
Simple but powerful graph traversing library for RDF
https://github.com/zazuko/clownface
graph-traversal graph-traversing-library gremlin linked-data rdf sparql
Last synced: 26 days ago
JSON representation
Simple but powerful graph traversing library for RDF
- Host: GitHub
- URL: https://github.com/zazuko/clownface
- Owner: zazuko
- Created: 2015-10-02T22:11:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T23:27:46.000Z (about 2 months ago)
- Last Synced: 2025-03-29T16:08:08.861Z (about 1 month ago)
- Topics: graph-traversal, graph-traversing-library, gremlin, linked-data, rdf, sparql
- Language: JavaScript
- Homepage: https://zazuko.github.io/clownface/
- Size: 1.13 MB
- Stars: 38
- Watchers: 10
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# clownface
[](https://travis-ci.org/github/zazuko/clownface)
[](https://npm.im/clownface)Clownface is a graph traversal library inspired by [Gremlin](https://tinkerpop.apache.org/gremlin.html) which allows to query any [RDF dataset](https://rdf.js.org/dataset-spec/) 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`](https://rdf.js.org/data-model-spec/#datafactory-interface) and [`DatasetFactory`](https://rdf.js.org/dataset-spec/#datasetfactory-interface), for example those provided by [`@rdfjs/data-model`](https://npm.im/@rdfjs/data-model) and [`@rdfjs/dataset`](https://npm.im/@rdfjs/dataset) packages respectively, as well as [`@rdfjs/namespace`](https://npm.im/@rdfjs/namespace).```shell
npm install clownface @rdfjs/environment @rdfjs/data-model @rdfjs/dataset @rdfjs/namespace
```````js
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 'clownface/Factory.js'const $rdf = new Environment([
NamespaceFactory,
DatasetFactory,
DataFactory,
ClownfaceFactory
])const graph = $rdf.clownface()
```Alternatively, if you already use [@zazuko/env](https://npm.im/@zazuko/env), it comes bundled with clownface and its dependencies.
```js
import $rdf from '@zazuko/env'const graph = $rdf.clownface()
```# Learn more
If you are new to RDF and JavaScript, consider our [Getting Started](https://zazuko.com/get-started/developers/#traverse-an-rdf-graph) guide that also covers Clownface basics.
For API documentation and examples, see http://zazuko.github.io/clownface/.