Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
membersList.map(member => {
dataset.add(rdf.quad(
rdf.namedNode(''),
rdf.namedNode(LDP.contains.toString()),
rdf.namedNode(containerUrl.toString() + member.name)))
})
debug('setting container type', LDP, RDF)
export function membersListAsQuadStream (containerUrl: URL, membersList: Array): ReadableStream {
const dataset = rdf.dataset()
membersList.map(member => {
dataset.add(rdf.quad(
rdf.namedNode(''),
rdf.namedNode(LDP.contains.toString()),
rdf.namedNode(containerUrl.toString() + member.name)))
})
debug('setting container type', LDP, RDF)
dataset.add(rdf.quad(
rdf.namedNode(''),
rdf.namedNode(RDF.type.toString()),
rdf.namedNode(LDP.BasicContainer.toString())
))
dataset.add(rdf.quad(
rdf.namedNode(''),
rdf.namedNode(RDF.type.toString()),
rdf.namedNode(LDP.Container.toString())
))
dataset.add(rdf.quad(
rdf.namedNode(''),
rdf.namedNode(RDF.type.toString()),
rdf.namedNode(LDP.RDFSource.toString())
))
debug(dataset)
return dataset.toStream()