UNPKG

@nestjs/common

Version:

Decorators, pipes, exceptions and utilities for NestJS applications: @Controller(), @Injectable(), @Body(), ValidationPipe, HttpException and more.

10 lines (9 loc) • 459 B
/** * A streaming body that yields what `body` does, with `project` applied to * each value the router sends as a line of JSON: that is any but strings and * binary data, which it sends as they are. * * Nothing is read from `body` before the result is, which it may never be: * the router stops a body it does not send (e.g. for a HEAD request) unread. */ export declare function mapStreamingBody(body: any, project: (value: unknown) => unknown): any;