Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDistricts().then(urls => {
// Add URLs
urls.forEach(url => {
smStream.write(url)
})
smStream.end()
// cache the response
streamToPromise(pipeline).then(sm => sitemap = sm)
// stream the response
pipeline.pipe(res).on('error', (err) => { throw err })
})
} catch (err) {