transform.destroy([error])


销毁流,并触发 'error' 事件。 调用该方法后,transform 流会释放全部内部资源。 实现者不要重写该方法,而应该实现 readable._destroy()Transform 流的 _destroy() 方法的默认实现会触发 'close' 事件。

Destroy the stream, and emit 'error'. 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'.