I was trying to use nexe to build an executable scuttlebot app, and it threw an error saying that this module has two functions with the same name.
This first destroy function:
function destroy(stream, cb) {
function onClose () {
cleanup(); cb()
}
function onError (err) {
cleanup(); cb(err)
}
function cleanup() {
stream.removeListener('close', onClose)
stream.removeListener('error', onError)
}
stream.on('close', onClose)
stream.on('error', onError)
}
The second destroy function:
function destroy (stream) {
if(!stream.destroy)
console.error(
'warning, stream-to-pull-stream: \n'
+ 'the wrapped node-stream does not implement `destroy`, \n'
+ 'this may cause resource leaks.'
)
else stream.destroy()
}
I was trying to use
nexeto build an executable scuttlebot app, and it threw an error saying that this module has two functions with the same name.This first
destroyfunction:The second
destroyfunction: