Download node_modules/eventsource-parser/dist/stream.cjs from pgits/mcp-jokes: direct link, hf CLI and curl.
- Browser
- Download file 818 Bytes
-
https://huggingface.co/spaces/pgits/mcp-jokes/resolve/main/node_modules/eventsource-parser/dist/stream.cjs
- Command line
-
hf download hf://spaces/pgits/mcp-jokes/node_modules/eventsource-parser/dist/stream.cjs
-
curl -L -o stream.cjs https://huggingface.co/spaces/pgits/mcp-jokes/resolve/main/node_modules/eventsource-parser/dist/stream.cjs
818 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: !0 }); | |
| var index = require("./index.cjs"); | |
| class EventSourceParserStream extends TransformStream { | |
| constructor({ onError, onRetry, onComment } = {}) { | |
| let parser; | |
| super({ | |
| start(controller) { | |
| parser = index.createParser({ | |
| onEvent: (event) => { | |
| controller.enqueue(event); | |
| }, | |
| onError(error) { | |
| onError === "terminate" ? controller.error(error) : typeof onError == "function" && onError(error); | |
| }, | |
| onRetry, | |
| onComment | |
| }); | |
| }, | |
| transform(chunk) { | |
| parser.feed(chunk); | |
| } | |
| }); | |
| } | |
| } | |
| exports.ParseError = index.ParseError; | |
| exports.EventSourceParserStream = EventSourceParserStream; | |
| //# sourceMappingURL=stream.cjs.map | |