RunKit + npm:

node v14.20.1
endpointsharetweet
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…