Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function serializeDataset (dataset) {
const stream = jsonldSerializer.import(dataset.toStream())
let result
stream.on('data', (data) => {
result = data
})
return $rdf.waitFor(stream).then(() => {
return result
})
}