Ensure a reliable close event for Node.js streams with on-stream-close. This tiny utility addresses inconsistencies in stream close event emission, ensuring it's always triggered upon stream finalization, regardless of errors or premature termination. It's invaluable for managing resources associated with streams, preventing memory leaks, and guaranteeing cleanup actions are executed consistently across various Node.js versions and stream implementations. Use on-stream-close for robust stream handling and predictable resource management.