MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / isValidRdf

Method isValidRdf

lib/ldp.mjs:202–211  ·  view source on GitHub ↗
(body, requestUri, contentType)

Source from the content-addressed store, hash-verified

200 }
201
202 isValidRdf (body, requestUri, contentType) {
203 const resourceGraph = $rdf.graph()
204 try {
205 $rdf.parse(body, resourceGraph, requestUri, contentType)
206 } catch (err) {
207 if (debug && debug.ldp) debug.ldp('VALIDATE -- Error parsing data: ' + err)
208 return false
209 }
210 return true
211 }
212
213 async put (url, stream, contentType) {
214 const container = (url.url || url).endsWith('/')

Callers 1

putValidRdfFunction · 0.80

Calls 1

graphMethod · 0.80

Tested by

no test coverage detected