Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm:
node v14.20.1
endpoint
share
tweet
const client = require("alcaeus@1.3.0/node").Hydra const { findNodes } = require('clownface-shacl-path') const clownface = require('clownface') const $rdf = require('rdf-ext') const { sh, hydra, schema } = require('@tpluscode/rdf-ns-builders') const { representation } = await client.loadResource('https://always-read-the-plaque.herokuapp.com/plaques'); /* [ sh:property [ sh:path ( hydra:member schema:name ) ] ] */ const shape = clownface({ dataset: $rdf.dataset() }) .blankNode() .addOut(sh.property, property => { property.addList(sh.path, [ hydra.member, schema.name ]) }) shape.out(sh.property).toArray().flatMap(property => { return findNodes(representation.root.pointer, property.out(sh.path)).terms })
Created from: https://npm.runkit.com/
Loading…
Clone and edit this document