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