1.1.2 • Published 2 years ago

nestjs-result2camelcase v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

NestJS camelCase API results

This is a NestJS Interceptor to transform the keys of API results (snake-cased or with spaces) to camelCase.

Installation

$ npm i nestjs-result2camelcase

How to use

In your main.ts:

app.useGlobalInterceptors(new ResultToCamelcaseInterceptor());

In your Controller you can use UseInterceptors decorator:

@UseInterceptors(new ResultToCamelcaseInterceptor())