mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
A constructor-function stream now reads `_final` and `_flush` when its writable side finishes, and `_transform` for each chunk, as Node does. A hook assigned after `Writable.call(this)` or `Transform.call(this)` runs, and an override of a PassThrough's `_transform` replaces the pass-through. Without `_final` or `_flush` the finish continues as Node's does. A runtime stream passed to a constructor-function stream's listeners, such as the source of a 'pipe' event, is the view whose pipe and unpipe accept constructor-function streams, so `src.unpipe(this)` in a 'pipe' listener unpipes instead of throwing.