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.

12 lines (11 loc) 273 B
import { Writable } from "stream"; export class Collector extends Writable { constructor() { super(...arguments); this.bufferedBytes = []; } _write(chunk, encoding, callback) { this.bufferedBytes.push(chunk); callback(); } }