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

Function rdfTemplate

lib/rdf-notification-template.mjs:63–76  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

61}
62
63export default function rdfTemplate (props) {
64 const { mediaType } = props
65 if (mediaType[0] === 'application/activity+json' || (mediaType[0] === 'application/ld+json' && mediaType[1].get('profile')?.toLowerCase() === 'https://www.w3.org/ns/activitystreams')) {
66 return serializeToJSONLD(generateJSONNotification(props), true)
67 }
68
69 if (mediaType[0] === 'application/ld+json') {
70 return serializeToJSONLD(generateJSONNotification(props))
71 }
72
73 if (mediaType[0] === 'text/turtle') {
74 return generateTurtleNotification(props)
75 }
76}

Callers

nothing calls this directly

Calls 4

serializeToJSONLDFunction · 0.85
generateJSONNotificationFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected