express-sse icon indicating copy to clipboard operation
express-sse copied to clipboard

Add `jsonData` option that can be disabled for HTMX users

Open chuckdries opened this issue 1 year ago • 0 comments

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

chuckdries avatar Nov 19 '23 01:11 chuckdries