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)

15 lines (14 loc) 554 B
import type { DataObject } from "./data-type.ts"; 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<Envelope>; export interface Envelope { payload: DataObject; attachments: Record<string, string[]>; }