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

Function serializeToJSONLD

lib/rdf-notification-template.mjs:55–61  ·  view source on GitHub ↗
(notification, isActivityStreams = false)

Source from the content-addressed store, hash-verified

53}
54
55function serializeToJSONLD (notification, isActivityStreams = false) {
56 notification['@context'] = [CONTEXT_NOTIFICATION]
57 if (!isActivityStreams) {
58 notification['@context'].unshift(CONTEXT_ACTIVITYSTREAMS)
59 }
60 return JSON.stringify(notification, null, 2)
61}
62
63export default function rdfTemplate (props) {
64 const { mediaType } = props

Callers 1

rdfTemplateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected