UNPKG

serverless-spy

Version:

CDK-based library for writing elegant integration tests on AWS serverless architecture and an additional web console to monitor events in real time.

10 lines (9 loc) 351 B
import { Readable } from "stream"; /** * @internal * @param stream * @param bytes - read head bytes from the stream and discard the rest of it. * * Caution: the input stream must be destroyed separately, this function does not do so. */ export declare const headStream: (stream: Readable | ReadableStream, bytes: number) => Promise<Uint8Array>;