UNPKG

cesr

Version:

[![NPM Version](https://img.shields.io/npm/v/cesr.svg?style=flat)](https://www.npmjs.com/package/cesr) [![NPM License](https://img.shields.io/npm/l/cesr.svg?style=flat)](https://github.com/lenkan/cesr-js/blob/main/LICENSE)

14 lines (13 loc) 499 B
import type { ParserOptions } from "./parser.ts"; import { type ParserInput } from "./parser.ts"; /** * Parses JSON messages with CESR attachments from an incoming stream of bytes. * * @param input Incoming stream of bytes * @returns An async iterable of messages with attachments */ export declare function parseMessages(input: ParserInput, options?: ParserOptions): AsyncIterableIterator<Message>; export interface Message { payload: Record<string, unknown>; attachments: string[]; }