zazuko / rdf-validate-shacl

Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
MIT License
98 stars 13 forks source link

Export property path matching #71

Closed pietercolpaert closed 3 years ago

pietercolpaert commented 3 years ago

Also for other use cases than validation I want to be able, from an array of quads, extract the rdfjs.Terms that match the property path:

matchPropertyPath<RDFJS.Term> (quads: RDFJS.Quad[], subject: RDFJS.Term, path: PropertyPath);

I assume the function on L61 in https://github.com/zazuko/rdf-validate-shacl/blob/master/src/property-path.js#L61 comes pretty close to what I need. Can this functionality be exported separately in this NPM package?

tpluscode commented 3 years ago

I think you might be interested in clownface-shacl-path