Parses CESR messages from an incoming stream of bytes.
Input to the parser. Can be an Uint8Array, string or stream.
Strings are treated as UTF-8 encoded data.
Optional
Parser options
An async iterable of Message objects
import { parse } from "cesr";const url = "https://example.com/oobi/EAQABAA..."; // URL returning a CESR streamconst response = await fetch(url);if (response.body) { for await (const message of parse(response.body)) { console.log(message); }} Copy
import { parse } from "cesr";const url = "https://example.com/oobi/EAQABAA..."; // URL returning a CESR streamconst response = await fetch(url);if (response.body) { for await (const message of parse(response.body)) { console.log(message); }}
Parses CESR messages from an incoming stream of bytes.