replace on-finished with stream.finished#95
Conversation
Signed-off-by: Sebastian Beltran <bjohansebas@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This pull request replaces the usage of on-finished with the built-in stream.finished for flushing the request, while still maintaining the isFinished check via on-finished for future maintainability.
- Replaces onFinished(req, write) with finished(req, write)
- Removes redundant module variables and adjusts variable declarations accordingly
Comments suppressed due to low confidence (1)
index.js:18
- [nitpick] Consider using 'const' instead of 'var' for 'isFinished' to promote immutability and maintain consistency with other modern declarations.
var isFinished = require('on-finished').isFinished
|
I really like the direction of this change - using This way, we can centralize the logic, maintain consistency for our packages that depend on Curious to hear your thoughts on this approach! |
|
Closing since version 3 of on-finished is being worked on. |
on-finished can be replaced by finished, isFinished is still required for future maintainability