Skip to content

afeiship/sse-parser

Repository files navigation

sse-parser

Event source message parser.

version license size download

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.