Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (destroyed) return
nodeStream.resume()
}
function cancel () {
destroyed = true
for (var name in listeners) nodeStream.removeListener(name, listeners[name])
nodeStream.push(null)
nodeStream.pause()
if (nodeStream.destroy) nodeStream.destroy()
else if (nodeStream.close) nodeStream.close()
}
return new ReadableStream({start: start, pull: pull, cancel: cancel})
}