transform.destroy([error])
销毁流,并可选择地触发 'error'
事件。
在此调用之后,转换流将释放任何内部资源。
实现者不应覆盖此方法,而应实现 readable._destroy()
。
Transform
的 _destroy()
的默认实现也会触发 'close'
,除非 emitClose
设置为 false。
Destroy the stream, and optionally emit an 'error'
event. After this call, the
transform stream would release any internal resources.
Implementors should not override this method, but instead implement
readable._destroy()
.
The default implementation of _destroy()
for Transform
also emit 'close'
unless emitClose
is set in false.