Event source message parser.
npm install @jswork/sse-parser
import SseParser from '@jswork/sse-parser';
// parse multi lines
SseParser.parse('event: message\ndata: hello\n\n');
// [{ event:'message', data: 'hello' }]
Code released under the MIT license.