UNPKG

thorish

Version:

This is a library of useful JS concepts and data structures for Node and the browser. It it, unashamedly, a dumping ground for code needed by [@samthor](https://twitter.com/samthor)'s projects.

6 lines (5 loc) 252 B
import type { Readable } from 'node:stream'; /** * Converts a node {@link Readable} or standard {@link ReadableStream}, which ends, to parsed JSON. */ export declare function readableToJson<T>(req: Readable | ReadableStream<Uint8Array>): Promise<T>;