express-sse
express-sse copied to clipboard
Add `jsonData` option that can be disabled for HTMX users
htmx is a library that, among other things, can pipe the contents of a SSE stream directly into the dom. If you JSON.stringify each message like this library does, that'll result in a bunch of quotation marks being added to the dom. This PR adds a configuration option called jsonData
(that defaults to true to preserve existing behavior). Users of htmx should set this to false